How is verification code verified?

Source: Internet
Author: User
Got a simple verification code at the beginning of only a verification code of the input box and the verification code picture submitted can be printed after you enter the verification code is correct or wrong later I added a text box added a few words SQL statement want to do a simple validation commit but do not know how to verify In practice, it's definitely not just a hint of error or correct. What if the error should prevent the form from being submitted? Another problem that needs to be solved first is that the CAPTCHA itself does not need to be inserted into the database, but there is a name in the form of the CAPTCHA. If the SQL statement is not processed, click Submit will be an error. 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:

Got a simple verification code at the beginning of only a verification code of the input box and the verification code picture submitted can be printed after you enter the verification code is correct or wrong later I added a text box added a few words SQL statement want to do a simple validation commit but do not know how to verify In practice, it's definitely not just a hint of error or correct. What if the error should prevent the form from being submitted? Another problem that needs to be solved first is that the CAPTCHA itself does not need to be inserted into the database, but there is a name in the form of the CAPTCHA. If the SQL statement is not processed, click Submit will be an error. 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";          }        }    }?>

You can write this

  • 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.