Jump to content
Sign in to follow this  
Howdy_McGee

Page Jump

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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".

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...