| Posted by axlq on 05/02/07 21:46 
In article <1178140660.159901.169340@e65g2000hsc.googlegroups.com>,ft310  <tooheys@fullchannel.net> wrote:
 >This might be the dumb one for the day but, I need a PHP function (or
 >whatever) similar to the JavaScript "self.location" in PHP.
 
 Look at the header() function in the php documentation.  A call like
 header("Location: http://example.com/mypage.php?etc") will cause an
 instant redirect to that page.
 
 If you want the script to know the URL of the page that called it, use
 the predefined variable $_SERVER[] - see
 http://us.php.net/manual/en/reserved.variables.php
 
 For example, $_SERVER['PHP_SELF'] in a script at the address
 http://example.com/mypage.php?etc would be /mypage.php/etc
 
 Hope that helps. -A
 [Back to original message] |