i replaced my original code with the code given on the php.net page and im still having the same problems.
does anyone know of any browser settings or network settings that may be effecting whether it works or not as im well and truly stumped here.
directory is chmod to 777.
heres my code if anyone can spot an error that may be messing things up:
<?
include("header.php");
if ($_POST["uploadFile"]) {
$username = $_POST["username"];
$uploaddir = "/home/**********/public_html/**********/".$username."/";
$uploadfile = $uploaddir . basename($_FILES['uploadedfile']['name']);
if (move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $uploadfile)) {
echo "<font color=red>The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded for user $username</font><br />";
} else {
echo "<font color=red>There was an error uploading the file, please try again!</font><br />";
}
}
?>
<h1>Upload File</h1>
<form enctype="multipart/form-data" action="<?$_SERVER['PHP_SELF']?>" method="post">
Select client to upload file for:<br />
<select name="username">
<?
$query = mysql_query("SELECT * FROM ********** ORDER BY username");
while ($row = mysql_fetch_row($query)) {
echo "<option>$row[1]</option>";
}
?>
</select>
<br />
<br />
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a file to upload:<br />
<input name="uploadedfile" type="file" />
<br />
<br />
<input type="submit" name="uploadFile" value="Upload File" class="button">
</form>
<?include("footer.php")?>
thanks in advance.
Edited by Stu, 13 November 2007 - 12:43 PM.
