By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,347 Members | 1,390 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,347 IT Pros & Developers. It's quick & easy.

PHP?stuff

The1corrupted
100+
P: 134
I'm sorta confused on the php?stuffone=stufftwo link extensions and just how they work. Anyone want to fill me in?
Feb 21 '07 #1
Share this Question
Share on Google+
5 Replies


Motoma
Expert 2.5K+
P: 3,235
I'm sorta confused on the php?stuffone=stufftwo link extensions and just how they work. Anyone want to fill me in?
This is setting variables in the PHP page via the $_GET variable.

http://somesite.foo/mypage.php?name=jon&toast=french

Inside the PHP script, the value of $_GET['name'] will be 'jon' and the value of $_GET['toast'] will be 'french'.
Feb 21 '07 #2

The1corrupted
100+
P: 134
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]
Feb 21 '07 #3

Motoma
Expert 2.5K+
P: 3,235
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]
the $_GET variable is used for retrieving variables passed from other scripts or the user via the URL.
Feb 21 '07 #4

The1corrupted
100+
P: 134
Basically like a session variable but without the session?
Feb 21 '07 #5

Motoma
Expert 2.5K+
P: 3,235

Post your reply

Sign in to post your reply or Sign up for a free account.