as an admin, i want to upload file to user download.but it was an error..
page title=upload.php
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="800" height="600" border="1" cellpadding="4" cellspacing="4">
<tr>
<td height="90" colspan="2"> </td>
</tr>
<tr>
<td width="26%" height="278" align="left" valign="top"> </td>
<td width="74%" valign="top">Please select file to upload:
<form action="controlupload" method="post" enctype="multipart/form-data" name="form1">
<p>
<input name="filename" type="file" id="filename">
</p>
<p>
<input type="submit" name="Submit2" value="Submit Query">
</p>
</form><p> </p></td>
</tr>
</table>
</body>
</html>
page title controlupload.php
<?
$updirectory = "C:\netserver\www\psm2";
$upfile = $updirectory . basename($FILES['filename']['name']);
echo $upfile;
if(move_upload_file($FILES['filename']['tmp_name'],$upfile))
{
echo"Congrats!File was uploaded!";
}
else
{
echo"File was not uploaded, There was an error.";
}
print_r($_FILES);
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
</body>
</html>