Cheers - i've got this working.
Just one question:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="5;url=http://habfab.com/upload">
<title>HabFab Uploader</title>
<link type="text/css" rel="stylesheet" href="style.css" />
</head>
<body bgcolor="#60bfe7">
<div id="container">
<div id="top"></div>
<div id="mid">
<br>
<br>
<br>
<br>
<?php
$target = "david/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
$ok=1;
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
{
echo "<strong>The file " . $_FILES["file"]["name"] . "has been uploaded! <br><br>It can be located at habfab.com/david/FILENAME <br><br> You will now be taken back to the upload page.</strong>";
}
else {
echo "<strong>There was a problem uploading your file! Make sure you specified a file to upload. You will now be redirected back to the upload page.</strong>";
}
?>
<br>
<br>
<br>
<br>
<div id="bot"></div>
</div>
</body>
</html>
The file " . $_FILES["file"]["name"] . "has been uploaded! should echo: "The file FILNAME has been uploaded!" But it just echoes "The file has been uploaded"
Why isn't it showing the $_FILES["file"]["name"]?
Thanks again
~ David
Bookmarks