How can i detect the $file is empty?
I tried any function , isset(),empty() and $file=="",but they can't tell the correct result.
$file is the upload file.
source code:
<?
if($submit)
if($file!="") copy($file,"/photo/$id.jpg");
?>
......
<form methed=post action=<?echo $PHP_SELF?> enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="100000">
<input type="file" name="file" size="32">
<input type="submit" name="Submit" value="add">
</form>
....
if methed=get, i can use the code $file!="".
but methed=post, it is error.
why ??? thank you!!!!
my english is not well,so i am sorry.
and thank you for your reading.