$_GET values simple question
Posted: Wed Jan 23, 2008 6:53 pm
Hi, I'm new here, thanks for having me.
I am having an issue where I'm trying to bring in variables using $_GET. Let's say I have a URL like this: somepage.php?blah=something&variable=
I am using isset($_GET['variable']) and it is returning true. Since that variable isn't set, I'm assuming it's just telling me that a variable called 'variable' exists? My goal is to figure out whether or not a variable is there, and if it is there, I want to then check whether or not that variable has a value associated with it.
Another thing I found odd was that the sizeOf a variable that hadn't been set in the URL string would return 1. For example, take a URL like this: somepage.php?var=
then: echo sizeOf($_GET['var']); //outputs 1
Any help? Thanks!
I am having an issue where I'm trying to bring in variables using $_GET. Let's say I have a URL like this: somepage.php?blah=something&variable=
I am using isset($_GET['variable']) and it is returning true. Since that variable isn't set, I'm assuming it's just telling me that a variable called 'variable' exists? My goal is to figure out whether or not a variable is there, and if it is there, I want to then check whether or not that variable has a value associated with it.
Another thing I found odd was that the sizeOf a variable that hadn't been set in the URL string would return 1. For example, take a URL like this: somepage.php?var=
then: echo sizeOf($_GET['var']); //outputs 1
Any help? Thanks!