Page 1 of 1

go where you come from.

Posted: Tue Sep 14, 2004 3:02 am
by ozkandokuz
I have a site which provides login section on every page of it.(with include function) The problem is that when the user login the site with his username he is redirected to the index.php. However I want him to go to the page that he login to the site.
For example the user is on the products page. He will enter from this page. After login I want him to come again to the products page.

Posted: Tue Sep 14, 2004 3:12 am
by kettle_drum
When you submit the login form send the details of the page with the form and then use that info in the redirect.

Posted: Tue Sep 14, 2004 3:17 am
by ozkandokuz
how can I send the details with the form.
Which php funciton holds the page name that the form submitted?

Posted: Tue Sep 14, 2004 3:36 am
by kettle_drum

Code: Select all

<input type="hidden" name="location" value="<?php echo $_SERVER&#1111;'PHP_SELF']; ?>">
Or do a print_r($_SERVER); to see what other values you could use.

Posted: Tue Sep 14, 2004 3:47 am
by ozkandokuz
Thanks a lot.

Posted: Tue Sep 14, 2004 10:03 am
by m3mn0n