How to verify the verification code? -Php Tutorial

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.