how can i check with php tht wheather the file field is set
Posted: Thu Dec 01, 2005 1:54 am
i want to check wheather the file field is set or not? i tried isset($_[file]) but its not worth while.
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
if (!empty($_FILES['fieldname']['tmp_name'])) {
}Code: Select all
if (!empty($_FILES['fieldname']['tmp_name'])) {
if($_FILES['fieldname']['error']==0){
// upload file
}
}