spires Posted December 21, 2009 Share Posted December 21, 2009 Hi. I have a graphic that I want to use instead of a standard input button to submit a form. The image works in every browser except IE6 (maybe later versions also) Is there anyway around this? Thanks <input name="submit" type="image" src="images/forms/bt_free_quote.jpg" id="inputButton" value="submit" /> Quote Link to comment Share on other sites More sharing options...
JonnoTheDev Posted December 21, 2009 Share Posted December 21, 2009 A button image doesn't use the name or value attributes. Should just be: <input type="image" src="/images/xyz.jpg" /> And thats it Quote Link to comment Share on other sites More sharing options...
spires Posted December 21, 2009 Author Share Posted December 21, 2009 OK, thanks for that. How can I then check to see if a form has been submitted using PHP? My Code: if (isset($_POST['submit'])){ } Thanks Quote Link to comment Share on other sites More sharing options...
spires Posted December 21, 2009 Author Share Posted December 21, 2009 Just worked it out thanks. I created a hidden input field in the form called submit. This posted with the form, so I could check to see if submit exists. Thanks for your help Quote Link to comment Share on other sites More sharing options...
haku Posted December 21, 2009 Share Posted December 21, 2009 <input type="button" src="path/to/image.jpg" name="submit" /> To check it: if(isset($_POST)) you can also check $_POST['submit_x'] or $_POST['submit_y'], but if the button has been clicked on with the enter key, neither of those will be filled in. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.