卡了一会儿。我要做的是在验证码匹配时将 Enum 行的值更新为 yes。这里的代码..提前谢谢。
<?php
session_start();
include ('dbconnect.php');
$verify_code = $_POST['vercode'];
// To protect MySQL injection (more detail about MySQL injection)
$verify_code = mysqli_real_escape_string($conn, $verify_code);
//Select SQL query against table
$query = "SELECT Verify_Code FROM Member WHERE Verify_Code = '$verify_code';";
$result = mysqli_query($conn, $query) or die(mysqli_error());
while($row = mysqli_fetch_array($result)){
$update_query = "UPDATE Member SET Verified = 'yes' WHERE Verify_Code = '$verify_code';";
echo $update_query;
//header("Location:TwitchMain.php");
}
?>
echo 语句带回 UPDATE Member SET Verified = 'yes' WHERE Verify_Code = 'Q#icm'; 这是正确的代码。