Re: refresh PHP page via onclick event

From: Date: Sat, 15 Apr 2006 11:51:53 +0000
Subject: Re: refresh PHP page via onclick event
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-234032@lists.php.net to get a copy of this message
but i do not want to add some variable at the end of link... when user click on the flag, it should first store language into a $_SESSION variable and after redirect/refresh page. On 4/15/06, chris smith <dmagick@gmail.com> wrote: > > On 4/15/06, Alain Roger <raf.news@gmail.com> wrote: > > Hi, > > > > Sorry to look like stupid for some of you, but i'm still not able to > link to > > link (<a> </a>) or to a button via onclick event) the refresh of my > page. > > > > i've check META tag and also $PHP_SELF variable, but it does not work. > > What happens when you try? > > > i have 1 PHP page on which i have 3 flags (3 images) > > if user click on 1 of these flags, $_SESSION['Localization'] is set up > to > > flag language and the page must be refreshed. > > Something like this should work: > > <a href="<?php echo $_SERVER['PHP_SELF']; > ?>?lang=en">English</a> > <a href="<?php echo $_SERVER['PHP_SELF']; > ?>?lang=fr">French</a> > > Then check $_GET['lang'] to use the new language var (then set it in > the session etc). > > -- > Postgresql & php tutorials > http://www.designmagick.com/ >

« previous php.general (#234032) next »