droidus Posted August 21, 2011 Share Posted August 21, 2011 i am submitting a form with this button, when run-over, changes the image. here is my button code: <a class="loginBtn" href="" name="login">Login</a> here is my php code that takes it: if (isset($_POST['login'])) { when the button is clicked, it does nothing. why won't it submit? Quote Link to comment https://forums.phpfreaks.com/topic/245388-trouble-submiting-form/ Share on other sites More sharing options...
cssfreakie Posted August 21, 2011 Share Posted August 21, 2011 can you give a reason why it should do anything? I can't see one.. as for practical form submissions: wrap the form in <form> tags and place a submit button inside of it. <form action="action.php" method="post"> <input type="text" name="fatgorillas" value="" /> <input type="submit" name="submit" value="submit this form" /> </form> Quote Link to comment https://forums.phpfreaks.com/topic/245388-trouble-submiting-form/#findComment-1260322 Share on other sites More sharing options...
droidus Posted August 21, 2011 Author Share Posted August 21, 2011 sorry; i do have the form tags around it. Quote Link to comment https://forums.phpfreaks.com/topic/245388-trouble-submiting-form/#findComment-1260333 Share on other sites More sharing options...
cssfreakie Posted August 21, 2011 Share Posted August 21, 2011 well ditch the link you have and use: <input type="submit" name="submit" value="submit this form" /> Quote Link to comment https://forums.phpfreaks.com/topic/245388-trouble-submiting-form/#findComment-1260334 Share on other sites More sharing options...
droidus Posted August 21, 2011 Author Share Posted August 21, 2011 yea i got it now; <input type="submit" src="../Images/login.png" name="login" class="loginBtn" /> thanks. Quote Link to comment https://forums.phpfreaks.com/topic/245388-trouble-submiting-form/#findComment-1260338 Share on other sites More sharing options...
droidus Posted August 22, 2011 Author Share Posted August 22, 2011 the only problem with it now, is that it looks like its the shape of a button... besides that, it works! [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/245388-trouble-submiting-form/#findComment-1260350 Share on other sites More sharing options...
cssfreakie Posted August 22, 2011 Share Posted August 22, 2011 the only problem with it now, is that it looks like its the shape of a button... besides that, it works! You can change that with css. just expirement a bit and keep in mind elements like this have some standard background borders margins etc. You can change all that. Quote Link to comment https://forums.phpfreaks.com/topic/245388-trouble-submiting-form/#findComment-1260362 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.