londrum

msg:4495560 | 8:09 pm on Sep 15, 2012 (gmt 0) |
it's possible to set (or overwrite) a GET variable or a POST variable in your script, just be writing
$_GET['page'] = 'blah';
$_POST['page'] = 'blah'; so they don't have to come from a URL or a form (although they usually do). i think isset just checks whether a variable exists. it doesn't care where it came from.
|
whatson

msg:4495561 | 8:17 pm on Sep 15, 2012 (gmt 0) |
Oh, so it just checks if a variable exists, that makes sense.
|
g1smd

msg:4495580 | 9:21 pm on Sep 15, 2012 (gmt 0) |
IF "IS SET" (binary answer: yes/no) THEN...
|
MinosTheNinth

msg:4496202 | 10:04 am on Sep 17, 2012 (gmt 0) |
In case testing $_GET['page'] it only test that variable exists (as answered above). But it does not test if variable has value. From isset point of view there is no difference between ?page and ?page=index If you want to test that variable has some data, you can use empty() - [php.net...]
|
jadebox

msg:4496430 | 9:56 pm on Sep 17, 2012 (gmt 0) |
Isset returns false if the specified variable (or array element) has not been defined or if it has been defined but was assigned a value of null. Isset is not a function. It is a "language construct." It sounds like I'm being pendantic to point it out, but it is important to know because you can't, for example, reference it as a variable function or pass it to a method expecting a function. -- Roger
|
|