Jump to content

IE and <input type="image" />


SharkBait

Recommended Posts

Am I doing this wrong??

[code]
<div style="margin-left: 250px; width: 100px; padding: 5px;">
<input type="hidden" name="uid" value="<?php echo $uid;?>" />
<input type="image" src="images/submit.gif" value="Submit" name="submit" title="Submit"/>
<!-- <input type="submit" value="Submit" name="submit" />  -->
</div>
[/code]

In Firefox it works fine.  The script is executed with no issues. In IE, it just refreshes itself. 
I have a

[code]
<?php
if(isset($_POST['submit'])) {
  echo "I WAS SUBMITTED";
}
?>
[/code]

Firefox shows the I WAS SUBMITED but IE does not.  I commented the <input type="image" out and used the regular <input type="submit" and it works. but I'd rather use the graphic as the button than CSS the form's button.

Link to comment
https://forums.phpfreaks.com/topic/16953-ie-and/
Share on other sites

Instead of [code]<input type="image" src="images/submit.gif" value="Submit" name="submit" title="Submit"/>[/code] I think you should use this: [code]<button type='submit' name='submit'><img src='images/submit.gif' alt='submit' /></button>[/code]

That will make it an actual submit button.
Link to comment
https://forums.phpfreaks.com/topic/16953-ie-and/#findComment-71646
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.