所以我遇到了这个问题,我从 POST 获取值,但是当插入查询运行时,数据库中没有显示任何内容,但我没有收到任何错误,并且回显工作。这是我的文件:
配置.php:
<?php
$host = "000webhost.com";
$user = "a9257*****";
$pass = "*****";
$db = "a9257*****";
$connect = mysql_connect($host, $user, $pass);
mysql_select_db($db, $connect);
?>
这是我的提交.php:
<?php
include "config.php";
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$email = $_POST['email'];
$pass = md5($_POST['pass']);
$insert = 'INSERT INTO tblUsers (userFirstName, userLastName, userEmail, userPassword) VALUES("'.$fname.'","'.$lname.'""'.$email.'","'.$pass.'")';
mysql_query($insert);
echo $fname;
echo $lname;
echo $email;
echo $pass;
?>
任何帮助将不胜感激。