Hi all, need help on uploading pics..
heres a snip of code:
if($_POST['Submit'] == 'Add Printer')
{
//COLLECTING GLOBAL VARIABLES
$name = $_POST['name_form'];
$location = $_POST['location_form'];
$ip = $_POST['ip_form'];
$File_name = $_POST['FileToUpload'];
//INSERTION INTO TECH TABLE
if($name != "" && $location != "" && $ip != "" && $File_name != "")
{
$insertquery = "INSERT INTO printers(PrinterName,PrinterLocation, IPnumber ) VALUES('$name','$location','$ip')";
mysql_query($insertquery);
if (copy($FileToUpload, "$File_name"))
{
//echo 'File Name :' . $File_name .';
//echo 'File Size :' . $File_size .';
echo 'The file was successfully uploaded!';
}
else
{
echo 'Your file could not be copied.';
}
unlink($FileToUpload);
}
}
***with the form looking like this for upload:
<input type="File" name="FileToUpload">
Select Picture To Upload</p>
*** and of course the submit form.
it gives this error in internet explorer:
Your file could not be copied.
Warning: unlink() [function.unlink]: Permission denied in C:\Inetpub\wwwroot\Intranet\Protocol\printers_addremove.php on line 55
My question is this error on my end or the servers end? is it a code error or a rights error.