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/


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

Reply via email to