出现错误了
代码:
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>确认验证码</title>
</head>
<body>
<?php
if(isset($_REQUEST['authcode'])){
session_start();
if(( $_REQUEST['authcode'])==$_SESSION['authcode']){
echo '<font color="#0000cc">输入正确</font>';
}else{
echo '<font color="#cc0000">输入错误</font>';
}
exit();
}
//strtolower转换为小写
?>
<form action="./form.php" method="post">
<p>验证码图片:<img id="captchaimg" src="./captcha_shuzizimu.php?r=<?php echo rand();?>" alt="" width='200' height="150">
<a href="javascript:void(0)"onclick="document.getElementById('captchaimg').src='./captcha_shuzizimu.php?r='+Math.random()">换一个</a></p>
<p>请输入图片中的内容:<input type="text" name='authcode' value=''></p>
<p><input type="submit"value="提交" style="padding:6px 20px;"></p>
</form>
</body>
</html>