When I upload my images, It's throwing an error. How do I change permission settings of my folder in windows? Is there anything wrong with my code?
//This is my path for storing images. (I am using wamp 2.0)
$targetPath="../artistImages/";
$image=$_FILES['myimage'];
$image['name'] = mysql_real_escape_string($image['name']);
$targetPath.=$image['name'];
if(move_uploaded_file($image['tmp_name'],$targetPath)) {
$insertQuery="INSERT INTO $tbl_name(ArtistImage)VALUES('".$image['name']."')";
$result=mysql_query($insertQuery) or die("Failed to upload image");
}
else {
echo "Could not upload file. Check read/write persmissions on the directory";
}