Howdy_McGee Posted March 3, 2011 Share Posted March 3, 2011 Ok, so I made my first PHP contact for with sanitation and such () The only problem is that it's half way down my page and when the user doesn't submit the correct information on submit it refreshes the page but doesn't jump back down to the contact form. Can I do something in PHP that will make the page load back up to the form or should I use some kind of javascript to bring it back to the bottom of the page? Link to comment Share on other sites More sharing options...
justsomeguy Posted March 3, 2011 Share Posted March 3, 2011 You can use a regular named anchor, like the "go to top" links, and have the form submit to a page with the anchor name in it, e.g. "submit.php#form". Link to comment Share on other sites More sharing options...
Howdy_McGee Posted March 3, 2011 Author Share Posted March 3, 2011 Can I add that stuff to an submit button? Link to comment Share on other sites More sharing options...
justsomeguy Posted March 3, 2011 Share Posted March 3, 2011 It would go in the form action. You would need to give an element on the page the name that you put in the URL, and when it loads the page it will jump to that element. Link to comment Share on other sites More sharing options...
Howdy_McGee Posted March 4, 2011 Author Share Posted March 4, 2011 that was great! Worked like a charm thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.