Cooper94 Posted February 26, 2010 Share Posted February 26, 2010 I have created a html form that when the image is pressed it will echo somthing out. But the code that is below seems to not work for what ever reason. I thank you all for your help and for your time! <form action="" method="POST"> <center> <table> <tr> <td>Callsign:</td> <td><input type="text" name="username" value="RPA" size="10" style="width: 79px;" /></td> </tr> <tr> <td>Password:</td> <td><input type="password" name="password" size="10" max-size="5" /></td> </tr> <tr> <td><input name="login" type="image" src="images/login.png" width="58" height="20"></td> </tr> </table> </center> </form> <?php if(isset($_POST['login'])) { echo "lol"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/193509-form-image-as-button-not-working/ Share on other sites More sharing options...
PFMaBiSmAd Posted February 26, 2010 Share Posted February 26, 2010 Images as submit buttons send the x,y coordinates where they were clicked on, per the W3.org specification. See this link how that can be accessed in php code - http://us3.php.net/manual/en/faq.html.php#faq.html.form-image Quote Link to comment https://forums.phpfreaks.com/topic/193509-form-image-as-button-not-working/#findComment-1018697 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.