这是神马情况?
<?php
//echo $_SESSION['code'];
if ($_POST['code']==$_SESSION['code']){session_start();
//echo $_SESSION['code'];
}
if ($_POST['code']==$_SESSION['code']){
echo '<font color="#CC0000">输入正确</font>';
}else{
echo '<font color="#0000CC"><b>输入错误</b></font>';
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Document</title>
</head>
<body>
<form action="form.php" method="post">
<p>验证码图片:<img border="1" src="./image.php?=<?php echo rand()?>" width="100" height="30" /></p>
<p>请输入图片中的内容:<input type="text" name="code" value="" /></p>
<p><input type="button" value="提交" style="padding:6px 20px;" /></p>
</form>
</body>
</html>