Re: variable ?

From: Date: Mon, 18 Dec 2000 11:59:40 +0000
Subject: Re: variable ?
Groups: php.general 
Request: Send a blank email to php-general+get-30883@lists.php.net to get a copy of this message
Ok.. i am assuming you have a form with 8 fields.. right? and 4 of them can be left blank. and you want to see which 4 WERE FILLED OUT? do this: if($var1!="") { $var1_status = 1; /// 1 for being filled out ///optionally you can do something else besides /// assigning status of course } else { $var1_status = 0; ///0 for being not filled out } repeat this for each variable name. of course you can perform any action instead of assigning a "status variable" for each one. Mike <mpeloso@princeton.edu> wrote in message news:91lkm2$lf1$1@toye.p.sourceforge.net... > I have a form that passes 4 of a possible 8 variables to a script.How can I > tell which 4 were passed? > Mike P > mpeloso@princeton.edu > > > > -- > 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 (#30883) next »