hey all,
would anyone be able to help me either make a file upload script(preferably) or if thats hard (im VERY new to PHP) tell me where i could get an easy to use one??
thanx
Printable View
hey all,
would anyone be able to help me either make a file upload script(preferably) or if thats hard (im VERY new to PHP) tell me where i could get an easy to use one??
thanx
really this isnt too complicated.
PHP Code:if (isset($_POST['submit'])) {
$fileUploadCopy = $_FILES['filename']['tmp_name'];
$fileUpload = $_FILES['filename']['name'];
$imageName = $fileUpload;
if ($fileUploadCopy != "none")
copy($fileUploadCopy,"directory/$imageName");
} else {
echo "<form method=\"post\" action=\"?\" enctype=\"multipart/form-data\">" .
"<input type=\"file\" name=\"filename\">" .
"<input type=\"submit\" value=\"upload\" name=\"submit\">";
}
How do you check if the file exist?