Sunday, August 3, 2008

Trouble submitting a form using a image type button? Use hidden field

Trouble submitting a form using a image type button?
Image type button sometimes not work with POST method in IE,
Easiest way to overcome this is to set a hidden field and check that in your php code


<?php

if(isset($_POST['sub']))
{
//do somthing
}
?>

<form name="form1" method="POST" action="">
<input type="image" src"..." />
<input type="hidden" name="sub" value="sub" />
</form>


Get Free Sinhala IT Learning Videos Kuppiya.com

 Subscribe To My Blog

No comments:

Post a Comment