| Author |
Message |
Blayde *nix forums beginner
Joined: 19 Jul 2006
Posts: 1
|
Posted: Wed Jul 19, 2006 6:44 pm Post subject:
Re: Must GET/POST Parameters Have Values? (And What is the Syntax for GET, If NOT)
|
|
|
I've used like your first example (no equals signs) with no problems
many times. All one must do to see if it is there is:
isset($_GET['this'])
I use this to get different pages from the same php script
-Blayde
David T. Ashley wrote:
|
|
| Back to top |
|
 |
flamer *nix forums beginner
Joined: 06 Jul 2006
Posts: 36
|
Posted: Wed Jul 19, 2006 1:13 am Post subject:
Re: Must GET/POST Parameters Have Values? (And What is the Syntax for GET, If NOT)
|
|
|
David T. Ashley wrote:
yes thats ok, but they need an equals sign at the end still like in
your second example, i havent tried it without, also
empty($_GET['this']) this is fine if you simply want to see if it
doesnt have another value, i use stuff like this for links to member
logins, that way they can be returned back to the same page after a
successful login and ensure everything was there that was before.
Flamer. |
|
| Back to top |
|
 |
David T. Ashley *nix forums Guru Wannabe
Joined: 21 Jan 2005
Posts: 124
|
Posted: Wed Jul 19, 2006 1:10 am Post subject:
Must GET/POST Parameters Have Values? (And What is the Syntax for GET, If NOT)
|
|
|
Are GET and POST parameters required to have values, i.e. are either of
these legal?
http://www.mydomain.com/index.php?this&that
http://www.mydomain.com/index.php?this=&that=
In my application, I have a GET/POST parameter that is significant just by
its presence (it doesn't need a value), and rather than say this=1&that=1 I
was wondering if it is legal to specify them without values.
Thanks, Dave. |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|