Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/56.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
MySQL数据库未使用php处理从表单更新_Php_Mysql_Forms_Sql Insert - Fatal编程技术网

MySQL数据库未使用php处理从表单更新

MySQL数据库未使用php处理从表单更新,php,mysql,forms,sql-insert,Php,Mysql,Forms,Sql Insert,使用代码 # the data we want to insert $data = array($first_name, $last_name, $email_from, $telephone, $dateofbirth, $addresslone, $addressltwo, $townnm, $countynm, $typeapp, $issubscribed); $STH = $dbh->prepare("INSERT INTO members (fname, sname, emai

使用代码

# the data we want to insert
$data = array($first_name, $last_name, $email_from, $telephone, $dateofbirth, $addresslone, $addressltwo, $townnm, $countynm, $typeapp, $issubscribed);
$STH = $dbh->prepare("INSERT INTO members (fname, sname, email, phone, dob, addressl1, addressl2, town, county, type, subscribed) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
$STH->execute($data);


?>
<!--<!DOCTYPE html>
<head><title></title></head><body> commented out during testing -->

Thank you for contacting us  We will be in touch with you very soon.

<!-- </body></html> -->

尽管看起来它工作得很好,但数据库似乎无法接收更新/

根据您的数据库结构截图,
表名为member
并且
您使用了members
进入
您的插入查询
根据您的数据库结构截图,
表名为member
并且
您使用了members
进入
您的插入查询
谢谢;我失明了。一个字符的打字错误。。。ffs!谢谢我失明了。一个字符的打字错误。。。ffs!如果你没有的话,这种尝试/捕捉不会有多大作用。如果你没有的话,这种尝试/捕捉不会有多大作用。
catch(PDOException $e)
    {
    echo $e->getMessage();
    }