我的代码无法插入数据,我看不到错误

时间:2019-06-17 10:44:44

标签: mysqli

$username = mysqli_real_escape_string($dbconnectiontwo, $_POST['Username']);

$mobile = mysqli_real_escape_string($dbconnectiontwo, $_POST['Mobile']);

$email = mysqli_real_escape_string($dbconnection,$_POST['Email']);

$password = mysqli_real_escape_string($dbconnection, $_POST['Password']);

$cpassword = mysqli_real_escape_string($dbconnection, $_POST['Cpassword']);

// Insert the user into the database
$queryinsert ="INSERT INTO Loggintability (Username, Mobile, Email, Password, Comfirm-P) VALUES('$username','$mobile','$email','$password','$cpassword')";
mysqli_query($dbconnection, $queryinsert) or die("Something is wrong"); 
header("location: indexloggedin.php");
$_SESSION['Username'] = $username;
$_SESSION['Mobile'] = $mobile;
$_SESSION['Email'] = $email;

0 个答案:

没有答案