yami007 Posted July 12, 2009 Share Posted July 12, 2009 i just dont know how to use an image as a submit button well the problem is that i cant get the name value to use in the statement : if (isset($_POST['submit'])) { echo 'you're logged in...'; } Quote Link to comment https://forums.phpfreaks.com/topic/165695-solved-problem-with-image-button/ Share on other sites More sharing options...
mattal999 Posted July 12, 2009 Share Posted July 12, 2009 Well, call your button like this: <input type="image" src="..." name="submitbutton" /> And grab it like: <?php if(isset($_POST['submitbutton'])) { } ?> Quote Link to comment https://forums.phpfreaks.com/topic/165695-solved-problem-with-image-button/#findComment-874051 Share on other sites More sharing options...
wildteen88 Posted July 12, 2009 Share Posted July 12, 2009 If the name of your button is called submit then you should check whether the variable $_POST['submit_x'] exists not $_POST['submit']. This only applies to using images as the submit button Quote Link to comment https://forums.phpfreaks.com/topic/165695-solved-problem-with-image-button/#findComment-874057 Share on other sites More sharing options...
mattal999 Posted July 12, 2009 Share Posted July 12, 2009 If the name of your button is called submit then you should check whether the variable $_POST['submit_x'] exists not $_POST['submit']. This only applies to using images as the submit button Oh, I see. You learn something new everyday! Quote Link to comment https://forums.phpfreaks.com/topic/165695-solved-problem-with-image-button/#findComment-874099 Share on other sites More sharing options...
yami007 Posted July 13, 2009 Author Share Posted July 13, 2009 thanks guys, it did work ^^ with the $_POST['submit_x'] Quote Link to comment https://forums.phpfreaks.com/topic/165695-solved-problem-with-image-button/#findComment-874483 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.