サマリー:<?php $base1=$_REQUEST['base1']; $base2=$_REQUEST['base2']; $prcname=$_REQUEST['prcname']; $price=$_REQUEST['price']; $prcXH=$_REQUEST['
<?php
$base1=$_REQUEST['base1'];
$base2=$_REQUEST['base2'];
$prcname=$_REQUEST['prcname'];
$price=$_REQUEST['price'];
$prcXH=$_REQUEST['prcXH'];
$other1=$_REQUEST['other1'];
$other2=$_REQUEST['other2'];
$sql1="insert into [base_table](base1,base2) values('{$base1}','{$base2}')";
$sql2="insert into [prc_table](prcname,price,prcXH) values('{$prcname}','{$price}','{$prcXH}')";
$sql3="insert into [other_table](other1,other2) values('{$other1}','{$other2}')";
query($sql1);
query($sql2);
query($sql3);
echo "寫(xiě)入完成";
?>
添削の先生:西門(mén)大官人添削時(shí)間:2019-04-09 09:43:41
先生のまとめ:query函數(shù)在哪里定義的?還有前臺(tái)傳過(guò)來(lái)的數(shù)據(jù),不加任何處理直接放到sql中去,很危險(xiǎn)