THE EXACT CODE FOR IT IS
PAGE 1 = upload.html
<head>
<title>Upload a File</title>
</head>
<body>
<h1>Upload a File</h1>
<form enctype="multipart/form-data" method="post" action="do_upload.php">
<p><strong>File to Upload:</strong><br>
<input type="file" name="img1" size="30"></p>
<P><input type="submit" name="submit" value="Upload File"></p>
</form>
</body>
+++++++++++++++++
Page 2 = do_upload.php
<?
if ($_FILES['img1'] != "") {
copy($_FILES['img1']['tmp_name'], "".$_FILES['img1']['name'])
or die("Couldn't copy the file!");
} else {
die("No input file specified");
}
?>
<head>
<title>Successful File Upload!</title>
<body>
<h1>Success!</h1>
<P>You sent: <? echo $FILES['img1']['name'] ?>, a <? echo $FILES['img1']['size'];
?> byte file with a mime type of <? echo $_FILES['img1']['type']; ?>.</p>
</body>
And there is your upload script. It will upload the script to whatever page your upload pages is kept in.
Cheers
Adam