adamhhh Posted December 19, 2008 Share Posted December 19, 2008 is it possible to have a standard php form, but with the submit button not at the end but halfway down? Obviously the stuff above it will submit as per usual but what about the form elements below it? thanks Link to comment https://forums.phpfreaks.com/topic/137732-php-forms-query/ Share on other sites More sharing options...
chriscloyd Posted December 19, 2008 Share Posted December 19, 2008 yes it will as long as its all in the <form></form> Link to comment https://forums.phpfreaks.com/topic/137732-php-forms-query/#findComment-719958 Share on other sites More sharing options...
flyhoney Posted December 19, 2008 Share Posted December 19, 2008 A form submit button submits every element that is in the same form tag. It doesnt matter where the submit button is in the form, every element in that form will be submitted. Some examples: <form> <input type="submit" value="Submit1" /> <input type="text" name="username" /> <input type="text" name="password" /> </form> The above will submit username and password when clicked. <form> <input type="submit" value="Submit1" /> <input type="text" name="username" value="Foo" /> <input type="text" name="password" value="Bar" /> </form> <form> <input type="submit" value="Submit2" /> <input type="text" name="username" /> <input type="text" name="password" /> </form> Above, when Submit1 is clicked, username will be Foo and password will be Bar. But if Submit2 is clicked, username and password will be empty. Does that makes sense? Link to comment https://forums.phpfreaks.com/topic/137732-php-forms-query/#findComment-719959 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.