I have a little chunk of code that checks to see if a variable exists and if
not then it sets it. It goes like this:

if (empty($page))
   $page = "login";

I then end that part of the php script after doing what I need to. Then I
start up again on the same html page and I assumed that $page had a value
assigned to it because of the above code, but it appears that it doesn't. Is
this supposed to happen or is something weird happening. I added that little
bit of code to the second chunk of code and it fixed the problem. Is that
the "right" way to do it? Is that variable only available in the <?php ?>
that it's declared in? Thanks,

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to