Page 1 (SELECT.html):
<html>
<head>
</head>
<form name="file" method="post" action="upload.php">
<input type="file" name="file">
<input type="submit" value="Upload" name="submit">
</form>
</html>
Page 2 (upload.php):
<?
//where do you want to put your files at?
//(The folder must exist already.)
$where = "storage/";
//make sure that the user selected a file to upload
if (empty($file)) {
//if they didnt, include the page so that they can
include "SELECT.html";
}else{
//supress the errors, upload or print an error
@copy($file, $where) or die("There was an error saving your file");
}
$results .="Your file was uploaded sucessfully can be viewed here: \n<BR>";
$results .= $where . $file . " . \n<BR>";
$results .= "This script courtesy <a href=\"http://flashages.com\">FlashAges.com</a>";
print $results;
?>
I must request that you include the final line of the $results variable.