|
#1
|
|||
|
|||
|
Help PHP Gurus: How to pass a new variable to the URL?
I am just about finished a hack that will make my PP bilingual and user-switchable (except for dbase entries). I need one more piece:
I want to code a single TAG for all template pages that recognizes the language chosen and then delivers a link to switch to the other. Currently, <CHANGE_LANGUAGE>, which goes on all template pages, recognizes the language and passes "&lang=fr" to the existing URL, switching both the language files and the templates (and I have a separate template file for each language). The problem is that as I currently have the link formatted it resets the URL to "index.php?lang=fr" regardless of where I am, which obviously then goes back to the current image. How do I pass from a link an additional variable to the existing URL without deleting any of the variables already there? The result has to work regardless of the content of the URL. That is, if I am currently on "index.php?x=browse&category=3", I need the link to add the "&lang=fr", but leave the rest intact, so the result is "index.php?x=browse&category=3&lang=fr". I thought &PHP_SELF would do it, but it is already defined in PP as index.php. Thanks for any help. Rob |
|
#2
|
|||
|
|||
|
I think I figured out the answer to my own question. See step 4 in this hack: http://forum.pixelpost.org/showthread.php?t=3668
|
| Post Reply |
| Thread Tools | |
|
|