I'm designing a web site in html and PHP, and all pages contain a header that is included at the top of every page.
However, the header contain a logging in/out form. Right now, when a user logs in/out, he is redirected to the home page of the site. Instead, I would like the visitor to just "stay" where he is (wether he's on the forum page, posting a reply, or on any other page of the site).
The redirection is determined in the login form by the following line of code:
<input type="hidden" name="redirect" value="{U_INDEX}" />
Where {U_INDEX} is the home page's URL. So I guess what I need is for the header to figure out on what page it is, and put that URL in a {U_REDIRECT} variable that will be my new value for that hidden field.
Any ideas?