Re: Variable Problem when UPGRADING...

From: Date: Tue, 30 Jan 2001 08:25:48 +0000
Subject: Re: Variable Problem when UPGRADING...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-37256@lists.php.net to get a copy of this message
hi again james, btw, consider doing this : if (empty($submit)) { or if (!empty($submit)) { as it doesn't run into such problems. or use isset although i tend to almost always use empty, i LOVE empty() !!! each have their uses : http://www.php.net/manual/en/function.empty.php http://www.php.net/manual/en/function.isset.php there are also compare functions such as : http://www.php.net/manual/en/function.strcmp.php but anyway, those are other options to consider. options are good. but really for such things use empty(), also the following is bad form (imho of course) : if ($var == '') { regards, philip olson http://www.cornado.com/ On Mon, 29 Jan 2001, James Smith wrote: > Alright, when i was programming with PHP3, I would use > if statements like this: > > if(!$submit) { > // display form > } else { > // display signup complete > } > > to make multiple pages. Or I would do this: > > if($action == "signup") { > if(!$submit) { > //display form > } else { > // display signup complete > } > } > if($action == "login") { > // show login screen > } > > But now I get an error like this: > > Warning: Undefined variable: submit in > c:\apache\htdocs\test.php on line 3 > > I don't know if I misconfigured my php.ini file or > what. > > Thanks, > > James > > __________________________________________________ > Get personalized email addresses from Yahoo! Mail - only $35 > a year! http://personal.mail.yahoo.com/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#37256) next »