<p>验证码:<input type="text" name="yanzm" size="6"><img src="../images/code.php" name="imageCode"> </p>
<?php 
include_once("../configs/sql.php");
include_once("../configs/smarty.php");
$aaa=$_SESSION["checknum"];
$ok=$_POST['hid'];
if($ok=='ok'){
$username=iconv("utf-8","gb2312",$_POST['username']);
$face=$_POST['face'];
$content=iconv("utf-8","gb2312",$_POST['content']);;
$ip=$_SERVER['REMOTE_ADDR'];
$yanzm=$_POST['yanzm'];
$time=time();
if($yanzm==$aaa){
$sql="insert into message (neirong,name,time,ip,gif) values('$content','$username','$time','$ip','$face')";
mysql_query($sql);
}else{
echo "aaa";
header("location:liuyan.php");
}
}
$smarty->display("liuyan.tpl");
?>提交的时候输入的内容和验证码不一致的时候也不输出aaa,这是为什么呢,难道跟smarty有关系吗?