PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I'm very new to PHP, and people on other forums won't help me. Can anybody review this, and then edit it? I know that "" returns false, and that I should have {}'s but I just need help, and quickly.
Thanks,
Alex
Last edited by Benjamin on Tue May 26, 2009 4:26 pm, edited 1 time in total.
Reason:Changed code type from text to php.
Zoxive, good tip! I believe he was using it for some type of login system with the get variables
(ie: domain.com/index.php?status=loggedin)
So the only way that the variable status would be established is if the url was stated as so. That's why I ran with the isset??? I Think that's correct to say...
In your example you had a variable set in scripting $myvar = ''; which would always be there...
My post was an example to extinguish the difference between empty and isset. Down the road if he kept using isset for all his "nothing" checks he could get confused to the behavior of isset.