how can i get the QUERY_STRING "userfile" that is passed
i want the directory it came from
i am using this
<form enctype="multipart/form-data" method="post" action="do_upload.php">
Send this file: <input name="userfile" type="file" /><br />
<input type="submit" value="upload file" />
this works fine
if ($_FILES[userfile] != "") {
$tmp = explode ( '.', $_FILES['userfile']['name']);
$fileext = $tmp[count($tmp)-1];
$allowedexts = array("rpm", "gz", "tar", "bz2" ,"avi","mpg","mpeg","rm","wmv","mov","asf","jpg","gif","jpeg","bmp","png");
if (in_array($fileext, $allowedexts)) {
@copy($_FILES['userfile']['tmp_name'],"/usr/home/".$_FILES['userfile']['name']) or die("Couldn't copy the file.");
} else {
print "File not trusted!";
}
} else {
die("No input file specified");
}
how can i get the QUERY_STRING that is passed