Page 1 of 1

ASP to PHP translation

Posted: Thu May 01, 2003 4:10 am
by jarow
Can anyone give me the PHP equivalents for the following ASP statements:

1. Session("svURL")=MM_rsUser.Fields.Item("urlredirect")

and

2. Response.Redirect "http://website/" & Session("svUrl") &""


Many thanks

Posted: Thu May 01, 2003 4:12 am
by []InTeR[]
1: sessionstart();
1: session_register("last_url");
1: $last_url = $urlredirect;
2: Header("Location: http://website/".$last_url);

Posted: Thu May 01, 2003 4:18 am
by volka
With recent versions of php you might also use the superglobal $_SESSION after starting the session.
http://www.php.net/manual/en/ref.sessio ... n.examples

Posted: Thu May 01, 2003 7:17 am
by twigletmac
also, if you have register_globals off session_register() won't work...

Mac