Here $a and $ b are equal. But in line 07 its not printing 'this is equal'. What is the problem? Plz help me. Remember when form submit $a and $b is equal. but when refresh they r not equal.
<?php
session_start();
$a=$_SESSION['randomnum'];
$b=$_POST['secure'];
echo $a.'<br/>'.$b;
if($a==$b){
echo "this is equal";
}
$_SESSION['randomnum']=md5(time());
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style>
#textarea{
width:90%;
border:thin #F00 solid;
}
</style>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<p> </p>
<table width="600" border="0" align="center" style="text-align:center">
<tr>
<td width="54">Question</td>
<td width="536"><textarea name="question" rows="10" id="textarea"></textarea></td>
</tr>
<tr>
<td colspan="2"><input type="hidden" name="secure" value="
<?php
echo $_SESSION['randomnum'];
?>" />
<input type="submit" name="button" id="button" value="Submit" /></td>
</tr>
</table>
<p> </p>
</form>
</body>
</html>