我正在尝试使用 php 将值插入到 mysql 表中。但我无法使用 php 代码插入值。我附上了我的表结构和 mysql 查询。谁能帮我解决这个问题。
PHP 代码
<body>
<?php
$lahipita=$_POST['pso'];
$hitAd=$_POST['pso1'];
$silumina=$_POST['ph'];
$sunday_observer=$_POST['pl'];
$virakesari=$_POST['p3'];
$thinakaran=$_POST['p4'];
$hitAd_bl=$_POST['ph3'];
$hitAd_bs=$_POST['ph2'];
$sunday_observer_bl=$_POST['p5'];
$sunday_observer_bs=$_POST['p6'];
$words=$_POST['words'];
$payment_method=$_POST['type'];
$total=0;
if($lahipita!=""){
$total=$total+900;
}
if($hitAd!=""){
$total=$toal+300;
}
if($silumina!=""){
$total=$total+500;
}
if($sunday_observer!=""){
$total=$total+300;
}
if($thinakaran!=""){
$total=$total+200;
}
if($virakesari!=""){
$total=$total+600;
}
if($hitAd_bl!=""){
$total=$total+2750;
}
if($hitAd_bs!=""){
$total=$total+1650;
}
if($sunday_observer_bl!=""){
$total=$total+2000;
}
if($sunday_observer_bs!=""){
$total=$total+1000;
}
$result=iud("INSERT INTO wp_paperAds(DEFAULT,'$lahipita','$hitAd','$silumina','$sunday_observer','$virakesari','$thinakaran','$hitAd_bl','$hitAd_bs','$sunday_observer_bl','$sunday_observer_bs','$words','','$payment_method','$total')");
?>
错误
Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT,'','','','','selected','','','','','','dfdfdfd','','Array','600')' at line 1