- Code: Select all
<form name="leaveform" method="post" action="#">
Approve:<input type="radio" name="leave" value="1" />Yes
<input type="radio" name="leave" value="0" />No
<input type="image" name="submit" src="http://images.cooltext.com/2260257.png" width="97" height="61" alt="Approve" />
</form>
<?php
if(isset($_POST['submit']))
{
$leave=$_POST['leave'];
$sql="UPDATE leave SET approve='$leave' WHERE lid='$lid'";
$result = mysql_query($sql) or die(mysql_error());
}
?>
This is my code for leave approval.But when i click the submit button(image),it didn't take the value of form elements.So-that i couldn't update the database.The funny thing is that,this code is working in firefox,but not in IE.Could anyone please tell me ,what is the problem of this code?

