[PHP] Empty textfield
Hi, what is the best way to check if a textfield is empty, and is it the same for file fields? thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Empty textfield
At 15:33 18-12-02 +, shaun wrote: Hi, what is the best way to check if a textfield is empty, and is it the same for file fields? if (empty(trim(@$textfield))) { } thanks for your help -- 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
Re: [PHP] Empty textfield
? if(empty($_POST['nameOfSomeTextField'])) { // it was empty } ? ? // untested!! if(!isset($_FILES['nameOfFileField'])) { // there wasn't a file } ? read ALL of http://www.php.net/manual/en/features.file-upload.php I'm assuming php = 4.1.1 Justin on 19/12/02 2:33 AM, shaun ([EMAIL PROTECTED]) wrote: Hi, what is the best way to check if a textfield is empty, and is it the same for file fields? thanks for your help Justin French http://Indent.com.au Web Development Graphic Design -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php