please help me !
i tried this small script …
but it doesn’t work
This is th Html page :
<form action='up.php' method='post' enctype='multipart/form-data' >
<input type='file' name='fileup' size='20'>
<input type='submit' value='upload'>
</form>
And thi is the PHP page name up.php
<?
$fileup=$_POST['fileup'];
if($fileup == ""){
echo " please select a file ! ";
}else{
$path=$PHP_SELF;
$path .= "/files/$fileup_name";
$att = strrchr($fileup_name,'.');
$alemtdadat = array('.gif','.jpg','.jpgf','.zip','.rar');
$maxsize = "81920";
$file_size = filesize($fileup);
if(! in_array($att,$alemtdadat)){
echo " This extension isn't allowed !!";
}else if($file_size > $maxsize ){
echo " file size is larger than allowed ";
}else{
$CopyFile = copy($fileup,"$path");
if($CopyFile){
echo " file was uploaded succesfully : ";
echo "<a href='http://$HTTP_HOST/uploadfiles/files/$fileup_name'>http://$HTTP_HOST/uploadfiles/files/$fileup_name</a>";
}else{
echo " file was not uploaded ! ";
}
}
}
?>
always i get the msg : " please select a file !"
what is wrong with my script ???