Stigmata
Veteran Member
Posts: 3520 Reputation: 45
21 / /
Joined: Jul 2003
|
RE: Upload script
code: <?
function uploadProg($filename1,$filename1_name){
########Set the destination here##############
$destination="/home/BLAHBLAH/public_html/uploads";
copy($filename1,$destination."/".$filename1_name);
echo "<h1>File(s) Uploaded...</h1>";
echo "<b>$filename1_name was uploaded succesfully.</b><br>";
echo "<a href="upload.php">Click here to go back.</a><br>";
echo "<a href="/uploads/">Click here to go to the uploads directory.</a>";
}
function main(){?>
<form method="post" action="#" enctype="multipart/form-data">
Files to Uploadbr>
<input type="file" name="filename1" size="20" tabindex="1"><br>
<input type="hidden" name="action" value="uploadProg">
<input type="submit" value="Upload Files">
</form><?}
switch ($action){
default:
main();
break;
case "uploadProg":
if ($filename1=="none") {echo("<h1>No File Selected....</h1>"); break;}
uploadProg($filename1,$filename1_name);
break;
}
?>
mine
This post was edited on 05-14-2005 at 09:21 PM by Stigmata.
|
|