Re: Removing URL Variables

From: Date: Mon, 24 Feb 2003 21:52:07 +0000
Subject: Re: Removing URL Variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-136994@lists.php.net to get a copy of this message
At 22:42 24.02.2003, Jim Pringle spoke out and said: --------------------[snip]-------------------- >I've noticed some sites that have variables in the link >(template.php?tpl=fold), but when the page is displayed, the variable is not >visable in URL in the address window. > >How do you do this? --------------------[snip]-------------------- Simply redirection... They go as this: 1) open a session (preferably using cookies...) 1) are there any URL variables? 2) YES: then store them to session storage, redirect to self 3) NO: jump to worker code session_start(); if (count($_GET)) { foreach ($_GET as $key => $value) $_SESSION['key'] = $value; header('Location: ' . $_SERVER['PHP_SELF']); exit; } // worker code here -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/

« previous php.general (#136994) next »