Hello!
I am trying to upload a image on server using the following html and php code.Please check
-------------------HTML PAGE----------------
<form enctype="multipart/form-data" action="itemadded.php?id=1" method="post" name="f1">
<input type="hidden" name="category" value="<?=$category?>">
<input type="hidden" name="itemname" value="<?=$itemname?>">
<input type="hidden" name="itemprice" value="<?=$itemprice?>">
<input type="hidden" name="itemdescription" value="<?=$itemdescription?>">
<input type="hidden" name="shippingprice" value="<?=$shippingprice?>">
<input type="text" name="itemsize" size="20">
<input type="file" name="photo" size="20">
<input type="submit" value="Upload">
</form>
-----------------------PHP Page-------------------------
$destDir = "images/";
if ($photo != "")
{
copy("$photo", $destDir."$photo_name")
or die("Couldn't copy the file!");
}
------------------------ERROR--------------------------------
Following is error:
Warning: Unable to create 'images/Constructionrw.gif': Permission denied in /home/dtulbovi/networkintegration.net/htdocs/itemadded.php on line 47
Couldn't copy the file!
Please help what is wrong with that code.
I am very thankfull to you.
Thanks in advance
Zulfiqar Ali