Posted by Ian Davies on 06/26/06 20:54
Hi
Can anyone tell me why the following code will NOT work
The error message should be displayed when there is something in both fields
if ((isset($_POST['Link']) && $_POST['Link'] !=='') &&
(isset($_POST['uploadedfile']) && $_POST['uploadedfile'] !=='')) {
$error_msg.="<br>You can't select to upload a link and a file at the same
time.";
curiously the following works
if(empty($_POST['Link']) || $_POST['Link'] ='' &&
empty($_FILES['uploadedfile']) || $_FILES['uploadedfile'] ='') {
$error_msg.="<br>You didn't select whether to upload a link or a file.";
}
to display a message when there is nothing in both fields
help gratefuly requested
Ian
Navigation:
[Reply to this message]
|