Re: help ... isset() don't work on posted variables...

From: Date: Mon, 14 Apr 2003 16:36:50 +0000
Subject: Re: help ... isset() don't work on posted variables...
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-143806@lists.php.net to get a copy of this message
On Sun, 13 Apr 2003 21:58:21 -0400, John W. Holmes wrote about "RE: [PHP] help ... isset() don't work on posted variables... " what the universal translator turned into this: >> To try and determine if the required fields have been filled in, I'm >using >> isset() ... but apparently I'm doing it wrong, 'cause it ain't >working. My >> other post pages just load the variables from the post vars (without >> testing if they're set), and then test if they're blank. This works >fine, >> but to make the code on this page simpler (because it's gonna be far >more >> complex in the end), I wanna use isset() ... but for the life of me I >> cannot get it working... > >Use empty(), not isset(). Text boxes will always be set (isset will be >TRUE) whether a value was typed in them or not. ... didn't know that about text boxes... >if(empty($_POST['name'])) { $error = "You did not give a name."; } Hehe ... works like charm ... thx a bunch... Rene -- Rene Brehmer This message was written on 100% recycled spam. Come see! My brand new site is now online! http://www.metalbunny.net

« previous php.general (#143806) next »