Re: newbie... - undefined var

From: Date: Mon, 26 Aug 2002 08:20:17 +0000
Subject: Re: newbie... - undefined var
Groups: php.general 
Request: Send a blank email to php-general+get-114112@lists.php.net to get a copy of this message
Or, perhaps, you should do: (if register_globals off) if (!isset($_GET['vw'])){ echo "variable is not set"; } Of course, you can also do: (if you want to--for some reason) if ($_GET['vw'] == ""){ write this code } - E PS
Do all vars in PHP have to be defined first?
No.
Matt Zur wrote:
BUT on the index.php I want to write this if statement: if ($vw == "") { write this code }
If you really mean to see if the variable has been set, try this instead: if (!isset($vw)) {
    echo "variable is not set";
} Happy hacking. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
_________________________________________________________________ 最新のファイナンス情報とライフプランのアドバイス MSN マネー http://money.msn.co.jp/

« previous php.general (#114112) next »