Redirect to last viewed page on login
Posted: Tue Dec 11, 2007 3:04 pm
Firstly, i'm sorry if this is being posted in the wrong section
I'm pretty new to phpBB but am using it with a site i'm developing at the moment. I've managed to get logins working from outside of the forum environment but i'm struggling to get the script to redirect back to the page from where the user logged in. It appears to work but once logged in phpBB kicks out a general error stating it was attempted to redirect to a potentially unsafe page.
The code i'm using to redirect is
the curPageName() function i'm using works fine, as i've echo'ed it from the login page and it correctly states the page name - so I know that the correct value is being sent.
Does anyone have any ideas?

I'm pretty new to phpBB but am using it with a site i'm developing at the moment. I've managed to get logins working from outside of the forum environment but i'm struggling to get the script to redirect back to the page from where the user logged in. It appears to work but once logged in phpBB kicks out a general error stating it was attempted to redirect to a potentially unsafe page.
The code i'm using to redirect is
Code: Select all
<input type="hidden" name="redirect" value=" . curPageName(); . " />
Does anyone have any ideas?