newbie... - undefined var

From: Date: Mon, 26 Aug 2002 07:40:32 +0000
Subject: newbie... - undefined var
Groups: php.general 
Request: Send a blank email to php-general+get-114107@lists.php.net to get a copy of this message
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. BUT on the index.php I want to write this if statement: if ($vw == "") { write this code } But then I get an error that the var is non defined. Do all vars in PHP have to be defined first? If it isn't defined, doesn't the program assume it's value is nothing? -Matt -- Matt Zur mattz@zurnet.com http://www.zurnet.com Need a Web Site??? - Visit... www.zurnet.com 1997 - 2002 - 5th Anniversary!!!

« previous php.general (#114107) next »