Jim S.
Jun 9 2005, 09:18 PM
i have a page that have many variable attached to it, like:
www.mysite.com/default.php?v=1
now "v" can change to many values depends on the link on the site, now here
is what i want, i want to pass a variable , let us say "b", and i want to
assigne that variable b some values, but i want what ever in the address
bar, like:
www.mysite.com/default.php?v=1&c=2 or whatever to stay the same than, i want
to append the "b" and it's value to the string, so it gets to be like :
www.mysite.com/default.php?v=1&b=3
is there a php function that can take the URL in the address (with the
values added) and append whatever to it?
i know there is a $_SERVER['PHP_SELF'] but it does take the URL without the
added variables. help please
thanks
Jim
Oli Filth
Jun 9 2005, 09:55 PM
Jim S. said the following on 09/06/2005 23:18:
QUOTE |
is there a php function that can take the URL in the address (with the values added) and append whatever to it? i know there is a $_SERVER['PHP_SELF'] but it does take the URL without the added variables. help please
|
$_SERVER['REQUEST_URI']
--
Oli
Jeroen Maathuis
Jun 10 2005, 10:15 PM
Oli Filth wrote:
QUOTE |
Jim S. said the following on 09/06/2005 23:18:
is there a php function that can take the URL in the address (with the values added) and append whatever to it? i know there is a $_SERVER['PHP_SELF'] but it does take the URL without the added variables. help please
$_SERVER['REQUEST_URI']
Or use the $_GET array: |
<?php
foreach ($_GET as $key => $value) {
echo "Key: $key; Value: $value<br />n";
}
?>
Pretty simple actually.
Jeroen Maathuis
Jun 10 2005, 10:16 PM
Oli Filth wrote:
QUOTE |
Jim S. said the following on 09/06/2005 23:18:
is there a php function that can take the URL in the address (with the values added) and append whatever to it? i know there is a $_SERVER['PHP_SELF'] but it does take the URL without the added variables. help please
$_SERVER['REQUEST_URI']
Or use the $_GET array: |
<?php
foreach ($_GET as $key => $value) {
echo "Key: $key; Value: $value<br />n";
}
?>
Pretty simple actually.
Oli Filth
Jun 11 2005, 12:12 AM
Jeroen Maathuis said the following on 11/06/2005 00:15:
QUOTE |
Oli Filth wrote:
Jim S. said the following on 09/06/2005 23:18:
is there a php function that can take the URL in the address (with the values added) and append whatever to it? i know there is a $_SERVER['PHP_SELF'] but it does take the URL without the added variables. help please
$_SERVER['REQUEST_URI']
Or use the $_GET array:
<?php foreach ($_GET as $key => $value) { echo "Key: $key; Value: $value<br />n"; } ?
Pretty simple actually.
|
Yeah, that sounds a hell of a lot simpler than $_SERVER['REQUEST_URI']!!!!
--
Oli
Jim S.
Jun 11 2005, 05:31 PM
well guys, thank u very very much,, i have not tried that solution yet, but
i hope if i have problmes for u to check back since i may know a little
about php, but i still struggle :(
please check back, don't leave me :( :)
again guys thanks a bunch
Jim
"Jim S." <[Email Removed]> wrote in message
news:Me3qe.1842$[Email Removed]...
QUOTE |
i have a page that have many variable attached to it, like: www.mysite.com/default.php?v=1
now "v" can change to many values depends on the link on the site, now here is what i want, i want to pass a variable , let us say "b", and i want to assigne that variable b some values, but i want what ever in the address bar, like: www.mysite.com/default.php?v=1&c=2 or whatever to stay the same than, i want to append the "b" and it's value to the string, so it gets to be like : www.mysite.com/default.php?v=1&b=3
is there a php function that can take the URL in the address (with the values added) and append whatever to it? i know there is a $_SERVER['PHP_SELF'] but it does take the URL without the added variables. help please thanks Jim
|
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.