note 41440 deleted from function.parse-str by tomsommer

From: Date: Sat, 10 Apr 2004 01:04:15 +0000
Subject: note 41440 deleted from function.parse-str by tomsommer
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-67936@lists.php.net to get a copy of this message
Note Submitter: mattsoft@mattsoft.net ---- I think this code might come in handy for some people. my site loads pages thru a single index.php file like this ./?page=home . for my login page, I wanted to send the user back to the page they were on before they clicked the button to go to the logon page. when the logon page is loaded and displayed, this code gets the page name from the referer header so it can add it to the form to be sent with the login info. sounds complex, but is pretty simple. if($frompage==""){ $a=parse_url(getenv("HTTP_REFERER")); parse_str($a['query'],$a); $frompage=$a['page']; }

« previous php.notes (#67936) next »