PHP error code in inserting a row in MySQL connected database

This question already has an answer here:

  • PHP parse/syntax errors; and how to solve them? 13 answers

  • i would put your post values in a variable and then use them in your sql statement or concatenate the string to avoid the use of so many quotations.

    "INSERT INTO customer (Name,Address,Amount_paid) VALUES (" . $_POST["name"] . "," .$_POST["address"]. "," . $_POST["amount_paid"] . ")";
    

    Try that instead. Or

    "INSERT INTO customer (Name,Address,Amount_paid) VALUES ( '$name', '$address','$amount_paid')";
    
    链接地址: http://www.djcxy.com/p/69680.html

    上一篇: xml版本1.0编码utf

    下一篇: 在MySQL连接的数据库中插入一行时出现PHP错误代码