Re: Not sure of my error

From: Date: Sat, 18 Nov 2000 00:15:06 +0000
Subject: Re: Not sure of my error
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-25982@lists.php.net to get a copy of this message
Try this: <? if(!strlen($state)){ "dude enter a state!"; }else{ "you state was: ".$state; } ?> --Joe On Fri, Nov 17, 2000 at 04:11:17PM -0800, Jerry Lake wrote: > For some reason the code below > always returns as true even if > there State == "whatever" It looks > correct to me, but apparently isn't. > <? > if ($state == ""); > { > echo "<div align=center>"; > echo "$state"; > echo "<h3>Please enter a state name</h3>"; > echo "</div>"; > exit; > } > else > { > stuff > } > ?> > > Jerry Lake > > -- > 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 ================================================================================ = Joe Stump joestump98@yahoo.com http://www.miester.org = ================================================================================ "Real programmers don't comment their code. It was hard to write, it should be hard to understand."

« previous php.general (#25982) next »