时间:2021-07-01 10:21:17 帮助过:5人阅读
";
echo $_POST['price']."
";
echo $_POST['type']."
";
$bookname = $_POST['bookname'];
$price = $_POST['price'];
$type1 = $_POST['type'];
require_once 'conn.php';
$result = mysql_query("insert into book (`bookname`,`price`,`time`) value ('$bookname','$price','$type1')");
dump($result);
// if($result){
// echo "添加成功";
// }
// else{
// echo '添加失败';
// }
?>
";
echo $_POST['price']."
";
echo $_POST['type']."
";
$bookname = $_POST['bookname'];
$price = $_POST['price'];
$type1 = $_POST['type'];
require_once 'conn.php';
$result = mysql_query("insert into book (`bookname`,`price`,`time`) value ('$bookname','$price','$type1')");
dump($result);
// if($result){
// echo "添加成功";
// }
// else{
// echo '添加失败';
// }
?>
建议你看下 INSERT INTO 的正确写法。。
是INSERT INTO tb () VALUES ...
是 values 而不是 value
http://database.51cto.com/art/201005/202402.htm