chordsoflife Posted December 23, 2008 Share Posted December 23, 2008 I've got a form submitting to itself. Simple so far, right? Here's my problem: the form is alll the way at the bottom of the page, and when the page reloads, it shoots the user back to the top of the page. I should add: my goal is for the page to reload at the bottom. I'm hoping this is a stupid little thing I should know. Thanks in advance! Quote Link to comment Share on other sites More sharing options...
MadTechie Posted December 23, 2008 Share Posted December 23, 2008 try this <a name="theform"></a> <form action="#theform" method="POST"> ..blar... Quote Link to comment Share on other sites More sharing options...
chordsoflife Posted December 23, 2008 Author Share Posted December 23, 2008 Fancy that. What's the point of the php_self line then? Why can't you just put action="#"? Quote Link to comment Share on other sites More sharing options...
trq Posted December 23, 2008 Share Posted December 23, 2008 Fancy that. What's the point of the php_self line then? Why can't you just put action="#"? You can. $_SERVER['PHP_SELF'] is for holding the current script. What you do with it is up to you. Quote Link to comment Share on other sites More sharing options...
MadTechie Posted December 23, 2008 Share Posted December 23, 2008 $_SERVER['PHP_SELF'] has alot of uses but personally i never rarely use them on a form. EDIT: oh by the way you don't need to have action if you pointing to yourself Quote Link to comment Share on other sites More sharing options...
trq Posted December 23, 2008 Share Posted December 23, 2008 EDIT: oh by the way you don't need to have action if you pointing to yourself You do if you want you html to validate. Quote Link to comment Share on other sites More sharing options...
MadTechie Posted December 23, 2008 Share Posted December 23, 2008 Owww i don't know that was a requirement... Note to self.. listen to thorpe more Quote Link to comment Share on other sites More sharing options...
chordsoflife Posted December 23, 2008 Author Share Posted December 23, 2008 Thanks, I appreciate it. Learned a lot from that question. 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.