RE: [PHP] Updating a GET variable

2010-11-17 Thread Tommy Pham
> -Original Message- > From: Marc Guay [mailto:marc.g...@gmail.com] > Sent: Wednesday, November 17, 2010 8:59 AM > To: PHP General > Subject: Re: [PHP] Updating a GET variable > > > Nathan previously mention what if instead of a language specific > > request,

Re: [PHP] Updating a GET variable

2010-11-17 Thread Marc Guay
> Nathan previously mention what if instead of a language specific request, > you have request for multiple languages. I get it now, multiple _simultaneous_ languages. Cheers, Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Updating a GET variable

2010-11-17 Thread Tommy Pham
> -Original Message- > From: Marc Guay [mailto:marc.g...@gmail.com] > Sent: Wednesday, November 17, 2010 6:30 AM > To: PHP General > Subject: Re: [PHP] Updating a GET variable > > > A bit late in the thread.  However, IMO, I don't think session is > > n

Re: [PHP] Updating a GET variable

2010-11-17 Thread Marc Guay
> A bit late in the thread.  However, IMO, I don't think session is necessary, > unless you intend to save it for later use, during that same visit from the > user.  If it's just a 1 time request, you can just use (example) > $_GET['lang']=en,de,fr,... > Then just split up individual languages, pro

RE: [PHP] Updating a GET variable

2010-11-16 Thread Tommy Pham
> -Original Message- > From: Nathan Rixham [mailto:nrix...@gmail.com] > Sent: Thursday, November 11, 2010 8:18 AM > To: Marc Guay > Cc: Tamara Temple; PHP General > Subject: Re: [PHP] Updating a GET variable > > Marc Guay wrote: > >> So all you need to do

Re: [PHP] Updating a GET variable

2010-11-11 Thread Nathan Rixham
Marc Guay wrote: So all you need to do, is take a look at $_SERVER['HTTP_ACCEPT_LANGUAGE'] to get a users language preferences. Hi Nathan, Yep, I'm using this var to set the default but I think it's nice to allow the user to override it. Maybe someone using their computer is more comfortable

Re: [PHP] Updating a GET variable

2010-11-11 Thread Marc Guay
> So all you need to do, is take a look at $_SERVER['HTTP_ACCEPT_LANGUAGE'] to > get a users language preferences. Hi Nathan, Yep, I'm using this var to set the default but I think it's nice to allow the user to override it. Maybe someone using their computer is more comfortable in a different l

Re: [PHP] Updating a GET variable

2010-11-10 Thread Nathan Rixham
Tamara Temple wrote: On Nov 10, 2010, at 8:58 AM, Marc Guay wrote: foreach($_GET as $k => $v) $qs[$k] = URLDecode($v); $qs['lang'] = 'en'; echo 'Flip'; Hi Tamara, Thanks for the tips. Do you see any advantage of this method over using a small POST form besides the styling problems I'll run

Re: [PHP] Updating a GET variable

2010-11-10 Thread Tamara Temple
On Nov 10, 2010, at 8:58 AM, Marc Guay wrote: foreach($_GET as $k => $v) $qs[$k] = URLDecode($v); $qs['lang'] = 'en'; echo 'Flip'; Hi Tamara, Thanks for the tips. Do you see any advantage of this method over using a small POST form besides the styling problems I'll run into trying to make t

Re: [PHP] Updating a GET variable

2010-11-10 Thread Marc Guay
> foreach($_GET as $k => $v) $qs[$k] = URLDecode($v); > $qs['lang'] = 'en'; > echo 'Flip'; Hi Tamara, Thanks for the tips. Do you see any advantage of this method over using a small POST form besides the styling problems I'll run into trying to make the submit button look like an achor? Marc -

Re: [PHP] Updating a GET variable

2010-11-10 Thread Marc Guay
> Session_start(); > $_SESSION['language'] = "en"; > You can set the session variable to the current get or maintain the original > passed. I think you may have misunderstood. The problem is holding onto the existing GET variables in the URL while manipulating or adding one of them... and doing

Re: [PHP] Updating a GET variable

2010-11-09 Thread Tamara Temple
On Nov 9, 2010, at 2:47 PM, Marc Guay wrote: What's wrong with just putting the url parameters in the link that you know you need, one by one? I have a footer that I include on every page and would like it to adapt to whatever situation it finds itself in. Is your suggestion, to do the fol

RE: [PHP] Updating a GET variable

2010-11-09 Thread admin
:48 PM To: a...@ashleysheridan.co.uk Cc: php-general Subject: Re: [PHP] Updating a GET variable > What's wrong with just putting the url parameters in the link that you know > you need, one by one? I have a footer that I include on every page and would like it to adapt to whatever situation

Re: [PHP] Updating a GET variable

2010-11-09 Thread Marc Guay
My working solution was to put it in a form with a hidden input with the correct name and value. But I'm still wondering what your advice is regarding best practice. Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Updating a GET variable

2010-11-09 Thread Marc Guay
> What's wrong with just putting the url parameters in the link that you know > you need, one by one? I have a footer that I include on every page and would like it to adapt to whatever situation it finds itself in. Is your suggestion, to do the following for the existing example: echo "Flip";

Re: [PHP] Updating a GET variable

2010-11-09 Thread a...@ashleysheridan.co.uk
Don't think about it in those terms and you'll see why it wasn't working. Http is stateless, so unless you use sessions, it will 'forget' everything from page to page. What's wrong with just putting the url parameters in the link that you know you need, one by one? If you have many, build a lit