PDA

View Full Version : How to redirect to LAST page?


veenuisthebest
09-05-2008, 01:35 AM
i want to Redirect the users to the page they were previously viewing.

I found this but it doesn't seem to work for me.

require_once(DIR . '/includes/functions_login.php');
$vbulletin->url = fetch_replaced_session_url($vbulletin->url);

Thank You

Hex_legend
09-05-2008, 09:47 PM
How about using one of these instead:


<FORM><INPUT type=button value=" Back " onClick="history.back();"></FORM>


Or


<FORM><INPUT type=button value=" Back " onClick="parent.history.back(); return false;"></FORM>

veenuisthebest
09-06-2008, 07:13 AM
thanks for your reply !

But I want to do it without a button and without javascript.

I am running a query on submitting a form, then I want to redirect to last page that the user accessed. See this is my code:-

require_once(DIR . '/includes/functions_login.php');
$vbulletin->url = fetch_replaced_session_url($vbulletin->url);
if (isset($_SERVER['QUERY_STRING'])) {
eval(print_standard_redirect('redirect_myphrase', true, true));}

Thanks

veenuisthebest
09-09-2008, 11:47 AM
anyone ?