I'm sorta confused on the php?stuffone=st ufftwo link extensions and just how they work. Anyone want to fill me in?
PHP?stuff
Collapse
X
-
Tags: None
-
This is setting variables in the PHP page via the $_GET variable.Originally posted by The1corruptedI'm sorta confused on the php?stuffone=st ufftwo link extensions and just how they work. Anyone want to fill me in?
http://somesite.foo/mypage.php?name =jon&toast=fren ch
Inside the PHP script, the value of $_GET['name'] will be 'jon' and the value of $_GET['toast'] will be 'french'. -
So if I were to apply that somewhere, it'd look a bit like this?
[PHP]
$_GET['foo'];
if ($var == 2) {
$_GET['foo']="bar";
} else {
$_GET['foo']="sandwich";
}[/PHP]Comment
-
the $_GET variable is used for retrieving variables passed from other scripts or the user via the URL.Originally posted by The1corruptedSo if I were to apply that somewhere, it'd look a bit like this?
[PHP]
$_GET['foo'];
if ($var == 2) {
$_GET['foo']="bar";
} else {
$_GET['foo']="sandwich";
}[/PHP]Comment
-
-
Comment