in below my code
in this code image is not move in folder but updated the path what are reason?
in this code image is not move in folder but updated the path what are reason?
Code:
if($btnUpdate != "")
{
$id = $_POST["id"];
$uploaddir = './upload/';
$ssImage = $uploaddir.basename($_FILES['image']['name']);
mysql_query("update gallery set gallery_image='".$ssImage."' where id_gallery = '".$id."' " ) or die(mysql_error());
if (move_uploaded_file($_FILES['image']['tmp_name'], $ssImage)) {
header('Location: gallarydetail.php');
}
}
Comment