I've been reading the forum for past couple of hours, trying to
find the solution for my problem. I am having problem with
isset() function.
Here is my code. Problem is that it always returns 'file ok'
even though there is no file selected. I tried both isset() and
!isset(), but both give me the same result.
Hope someone can help me.
if($_POST['submit_01']){
if(!isset($_FILES['tab_1_photo'])){
echo 'no file';
}else{
echo 'file ok';
}
}
And this is a part of my form.
<form action="'. $_SERVER['PHP_SELF'] .'" method="post" id="edit" name="edit" enctype="multipart/form-data">
<input type="file" name="tab_1_photo" >
<input type="submit" value="Preview" name="submit_01">