这是php验证码Captcha的使用方法:
以下代码放在form的提交表格中:
<img src="/CaptchaSecurityImages.php" />
<input id="security_code" name="security_code" type="text" />
以下代码放在提交后接收的php中:
<?php
session_start();
if(($_SESSION['security_code'] == $_POST['security_code']) && (!empty($_SESSION['security_code'])) ) {
// Insert you code for processing the form here, e.g emailing the submission, entering it into a database.
unset($_SESSION['security_code']);
} else {
// Insert your code for showing an error message here
}
?>
本站下载地址:http://www.maycode.com/index.php/docman/doc_details/78-php--captcha.html
相关文章
| 几种流行的AJAX框架jQuery,Mootools,Dojo,Ext JS的对比(下) |
| 几种流行的AJAX框架jQuery,Mootools,Dojo,Ext JS的对比(中) |
| 几种流行的AJAX框架jQuery,Mootools,Dojo,Ext JS的对比(上) |
| [转帖]TAG CLOUD生成规范 |



