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.="<b r>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.="<b r>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
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.="<b r>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.="<b r>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
Comment