简体   繁体   English

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

[英]MySQL db not updating from form with php processing

Using the code 使用代码

# 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> -->

The user is presented with the success message: 向用户显示成功消息:

Thank you for contacting us We will be in touch with you very soon. 感谢您与我们联系。我们会尽快与您联系。

There are no php errors recorded. 没有任何PHP错误记录。

This is to insert into this database 这是要插入此数据库 MQL列

Error reporting is in the form of the PDO try catch: 错误报告采用PDO try catch的形式:

catch(PDOException $e)
    {
    echo $e->getMessage();
    }

Despite it looking as if it is working perfectly, however, the database seems unable to receive updates. 尽管看起来好像运行良好,但是数据库似乎无法接收更新。 :/ :/

根据您的数据库结构屏幕快照, table name is member并且you used members your insert query you used members table name is member

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM