[PHP] newbie... - undefined var

2002-08-26 Thread Matt Zur
I'm just starting to learn php and have a quick question. I'm making a site with file includes. so for example my default page will be: index.php and services page with be called services.php BUT... I want to link to services via this method: index.php?vw=services Still no problem there.

Re: [PHP] newbie... - undefined var

2002-08-26 Thread Chris Shiflett
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

FW: [PHP] newbie... - undefined var

2002-08-26 Thread Jonni
AM To: [EMAIL PROTECTED] Subject: [PHP] newbie... - undefined var I'm just starting to learn php and have a quick question. I'm making a site with file includes. so for example my default page will be: index.php and services page with be called services.php BUT... I want to link

Re: [PHP] newbie... - undefined var

2002-08-26 Thread @ Edwin
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.