using an absolute link in php
I have a login form that I created with dreamweaver and I want the script to send the user, on a successful login, back to the page where he came from.
the php code dreamweaver created is (part):
$MM_redirectLoginSuccess =" ";
and I stuck in the $_SERVER['HTTP_REFERER'] to get:
$MM_redirectLoginSuccess = '"'. $_SERVER['HTTP_REFERER']. '"';
yet the HTTP_REFERER is an absolute link (http://www.example.com/...) while the php thinks it is getting a relative link.
therefore I get the error:
Forbidden
You don't have permission to access /pages/"http://www.example.com/whatever.php" on this server.
Is there an easy way to rectify this?
thanks,
YWSW
P.S. the code $MM_redirectLoginSuccess = $_SERVER['HTTP_REFERER']; (without the quotations) does not work at all.
