crazy form thing
Posted: Wed Aug 24, 2005 4:36 pm
i have this bit of code:
the following line after that is
if ($u) {
upload file;
}
i keep getting "please select a file to upload!" on my page, but $u apparently returns true becuase it's moving past the next if statement and uploading the file perfectly.
I'm wondering if i'm testing this for incorrectly...what would the correct syntax to check that a file (browse) form has been filled?
Code: Select all
if (isset($_POST['upload'])) {
$u = TRUE;
} else {
$u = FALSE;
$message .= '<p>Please select a file to upload!</p>';
}if ($u) {
upload file;
}
i keep getting "please select a file to upload!" on my page, but $u apparently returns true becuase it's moving past the next if statement and uploading the file perfectly.
I'm wondering if i'm testing this for incorrectly...what would the correct syntax to check that a file (browse) form has been filled?