Help me!
I'm trying to use a file upload script on my site.Here is a part of the script I'm using:
$filename = substr(strrchr($file,"\ "),1);
if(!copy($file,$path.$filename))
{
echo "<font color='red'><center>".$message["uncomplete"]."</font></center>";
}
else
{
echo "<font color='red'><center>".$message["complete"]."</font></center>";
}
echo "
<form method='post' enctype='multipart/form-data'action='upload.php' >
<table frame=box rules=none border=0 cellpadding=2 cellspacing=0 align='center'>
<tr><td>".$message["uploadtxt"]."<td><input type='file' name='userfile'>
<tr><td><td><input type='submit' value='".$message["uploadbutton"]."' name='upload'>
</table>
</form>
The problem is that after you pick a file, the form submits an empty string in $file!!! What am I doing wrong?