RE: [PHP] Check the contents of a file field
| From: | John W. Holmes | Date: | Tue, 06 May 2003 02:23:17 +0000 |
| Subject: | RE: [PHP] Check the contents of a file field | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-146484@lists.php.net to get a copy of this message | ||
> I am trying to check whether the contents of a file field is empty but
the
> following code doesnt work:
>
> if(isset($_POST[file]) == ''){
> $error = "Please select a document to add to the project";
> //etc
>
> could someone explain my error here please?
Umm... how about empty()?
If(empty($variable))
{ echo "ummm... variable is empty"; }
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/