准备好的陈述给我带来了问题。我可以从数据库中读取数据,但无法写入。这是我遇到问题的准备好的声明。没有错误,但代码执行时没有任何反应。谢谢。
/*Prepared statement option 1*/
$stmt = mysqli_prepare($con, "INSERT USERS (userEmail, userPassword, userFname, userLname) VALUES (?, ?, ?, ?)");
/*prepared statement option 2*/
$query = "INSERT INTO users (userEmail, userPassword, userFname, userLname) VALUES (?, ?, ?, ?)";
$stmt = mysqli_prepare($con, $query);
/绑定语句/
mysqli_stmt_bind_param($stmt, 'ssss', $userEmail, $userPassword1, $euserFname, $userLname);
/* execute prepared statement */
mysqli_stmt_execute($stmt);
/* close statement and connection */
mysqli_stmt_close($stmt);