<form name=frm action="" method=post>
Which is the country of India.<br>
<input type=hidden name=check value=check>
<select name=country onchange=submit()>
<option value=select>Please select one....</option>
<option value=Calcutta>Calcutta</option>
<option value=Delhi>Delhi</option>
<option value=Chennai>Chennai</option>
</select>
<script language=javascript>
function submit()
{
document.frm.submit();
}
</script>
<?
if(isset($_POST[check]))
{
if ($_POST[country] == "Delhi")
echo "Correct";
else
echo "Incorrect";
}
?>
</form>
Problem in this is when I refresh the page previous answer still appears on the page.
Suppose I selected the value Calcutta then incorrect is echoed.
When I refresh the page incorrect still appears there.
Please help me solve this problem.
Thanking you.
Bhuwan.
Thanks.
[email protected]