RE: [PHP] empty and isset

From: Date: Thu, 06 Feb 2003 02:57:57 +0000
Subject: RE: [PHP] empty and isset
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-134535@lists.php.net to get a copy of this message
They both work, you're just not using the correct logic or something. Show your code again... your actual code that isn't working (so you say) and the form that's being submitted. Also, is register_globals on or off? Load this small bit of code as proof that it works: <form method="POST"> <input type="text" name="name"> <input type="submit"> </form> <? if(isset($_POST['name'])) { echo "You submitted a name "; if(empty($_POST['name'])) { echo "that was blank."; } else { echo "of {$_POST['name']}"; } } ?> ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ > -----Original Message----- > From: Sunfire [mailto:rusty_81@msn.com] > Sent: Wednesday, February 05, 2003 8:08 PM > To: php-general@lists.php.net > Subject: [PHP] empty and isset > > i tried to use empty and isset to check and see if variables were being > used > in a form.. im not getting any kind of good answer from the server when i > try using empty and isset... it all works the same and that is cut out > anything regardless of if it was used or not... > > > any thing to help? > the docs didnt seem to be much help and im sort of confused > > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#134535) next »