I got a simple verification code. at first, only one verification code input box and verification code image can be submitted, and the verification code you entered is correct or incorrect. then I added a text box with a few more I want to submit a simple SQL statement, but I don't know how to verify it in... I got a simple verification code. at first, only one verification code input box and verification code image can be submitted, and the verification code you entered is correct or incorrect. then I added a text box with a few more I want to make a simple SQL statement for verification submission, but I don't know how to verify it. In reality, it is not just an error or a correct one. how should I block form submission? Another problem that needs to be solved first is that the verification code itself does not need to be inserted into the database, but there is name in the verification code form. if the SQL statement is not processed, click submit to report an error. what should I do? Invalid parameter number: number of bound variables does not match number of tokens in D: wampwwwyzm1.php on line 28
prepare("insert into test(num)values(:num)"); $stmt->execute($_POST); } ?>
Reply content:
I got a simple verification code. at first, only one verification code input box and verification code image can be submitted, and the verification code you entered is correct or incorrect. then I added a text box with a few more I want to make a simple SQL statement for verification submission, but I don't know how to verify it. In reality, it is not just an error or a correct one. how should I block form submission? Another problem that needs to be solved first is that the verification code itself does not need to be inserted into the database, but there is name in the verification code form. if the SQL statement is not processed, click submit to report an error. what should I do? Invalid parameter number: number of bound variables does not match number of tokens in D: wampwwwyzm1.php on line 28
prepare("insert into test(num)values(:num)"); $stmt->execute($_POST); } ?>
prepare("insert into test(num)values(:num)"); $stmt->execute(array(':num'=>$_POST['num']); }else{ echo "wrong"; } } }?>
Write it in this way.