Re: Keeping URL Variables

From: Date: Thu, 17 Apr 2003 21:29:01 +0000
Subject: Re: Keeping URL Variables
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-144347@lists.php.net to get a copy of this message
Yes there is such a thing as a "global include" by adding the following lines to the .htaccess file in the directory you wish to affect.. php_value auto_prepend_file filename.php php_value auto_append_file filename.php However if the option is user definable then you're gonna have to either store that information in a Session or a Cookie. Otherwise you're in for a hellova crack parsing html and appending the variable to every link on the page. - Kevin ----- Original Message ----- From: "Stephen" <webmaster@melchior.us> To: "PHP List" <php-general@lists.php.net> Sent: Thursday, April 17, 2003 2:58 PM Subject: Re: [PHP] Keeping URL Variables > The problem is the sessions get overwritten by the user's default data. > > As for the hidden fields, that would be just as hard as setting each <a> tag > indvidually... > > Thanks, > Stephen Craton > http://www.melchior.us > > > ----- Original Message ----- > From: "Jonathan Pitcher" <jpitcher@cfedc.com> > To: "Stephen" <webmaster@melchior.us> > Cc: <php-general@lists.php.net> > Sent: Thursday, April 17, 2003 3:53 PM > Subject: Re: [PHP] Keeping URL Variables > > > Stephen, > > Your best bet would be to use sessions: > > http://www.php.net/manual/en/ref.session.php > > > Jonathan Pitcher > > On Thursday, April 17, 2003, at 03:46 PM, Stephen wrote: > > > Hello, > > > > Is there a way to keep a URL variable every page you go to without > > editing the <a> tag's href attribute everytime? > > > > Basically, I have skin options and depending on what the URL variable > > "skinid" is, it shows that skin (I have multiple websites all using > > this PHP script). What I want to be able to do is get the value of > > skinid, then if the user goes to another page via a link or form, that > > skinid is still chosen. What's happening right now is if a user clicks > > a link, the skinid in the URL is nolonger set so it defaults to the > > default skin. > > > > Is there a way to always pass the variable to any part of the side > > through a global include without having to put it in the URL in the > > <a> tag every time? > > > > Thanks, > > Stephen Craton > > http://www.melchior.us > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#144347) next »