Something like this: <?php $valid=1; foreach ( $name as $value ) { if ( $value == '' || ! isset($value) ) { $valid=0; } } if ( $valid == 1 ) { do_stuff(); } else { give_error(); } ?> -----Original Message----- From: Rodrigo Peres [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 10:11 AM To: PHP Subject: [PHP] php array
Hi list, I think this could be an idiot question but I couldn't find an answer. I have 4 input text in a html, and I'd like to store them as a list, so I've named it Name[]. OK, php understand it as an array, but how can I make an validation code with javascript to know if the user didn't typed in this fields??? I couldn't do javascript recognize my name[] field Thank's in advance Rodrigo -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php