Passing _any_ variable to next page
| From: | stephan dot schoell at ch dot abb dot com | Date: | Wed, 09 Aug 2000 15:11:39 +0000 |
| Subject: | Passing _any_ variable to next page | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-10938@lists.php.net to get a copy of this message | ||
Hi folks,
I think I'm blind, but I'm looking for a way to pass _every_ variable of one
script to another (via URL or form submit, doesn't matter). I'm about to expand
my site for multilanguage support. So when a visitor e.g. clicks on "english"
the same page should be called again, with the same variable values as it has
been called before. I'm lazy, so I don't want to bother which variable is
used/set specifically on a actual page. I just want to dump _any_ variable to
the next page.
Maybe it works by adding ?HTTP_GET_VARS/?HTTP_PUT_VARS respectively (track_vars
enabled) to the language choice hrefs. In the next page I have to evaluate this
array (known procedure).
myscript.php3:
<html>
....
<a href="<?php echo $PHP_SELF."?HTTP_GET_VARS=".$HTTP_GET_VARS
?>&lang=e">click
here for english version</a> |
<a href="<?php echo $PHP_SELF."?HTTP_GET_VARS=".$HTTP_GET_VARS
?>&lang=g">hier
klicken für deutsche Version<a> |
<a href="<?php echo $PHP_SELF."?HTTP_GET_VARS=".$HTTP_GET_VARS
?>&lang=f">cliquer ici pour version françcaise</a>
.....
</html>
Any suggestions, comments or tips? Might it work that way?
Thanx in advance.
--Steff