fighnight Posted December 13, 2007 Share Posted December 13, 2007 Hi I am coding in PHP and I was wondering when I submit with the following code, the submit feature doesn't actually submit/ onClick="this.disabled = 'true'; this.value = 'Loading..'; this.form.submit();" I have a $_POST[submit] function but it doesnt work Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted December 13, 2007 Share Posted December 13, 2007 The $_POST['submit'] will only come if the submit button is click to get around this just put a hidden field in the form and use that hidden field for submission checks Quote Link to comment Share on other sites More sharing options...
fighnight Posted December 13, 2007 Author Share Posted December 13, 2007 When I add hidden value, it doesn't work for submitting on IE Quote Link to comment Share on other sites More sharing options...
fighnight Posted December 13, 2007 Author Share Posted December 13, 2007 My full coding form method="post" action="map.php" name="submit"> <input type="hidden" name="hidden" value="submit"> <input type="submit" name="submitButton" value="Login" onClick="this.disabled = 'true'; this.value = 'Loading..'; this.form.submit();"></form> Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted December 13, 2007 Share Posted December 13, 2007 try this <form method="post" action="map.php" name="submit"> <input type="hidden" name="submitform" value="submit"> <input type="submit" name="submitButton" value="Login" onClick="this.disabled = 'true'; this.value = 'Loading..'; this.form.submit();"></form> and in your php code check for if (isset($_POST['submitform'])) { that should work 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.