Hello
I need help on this code i used trying to upload images on my site, Here is the code
<?php
if(isset($_POST['add_post'])){
//$id = $_POST['id'];
$title = $_POST['title'];
$date = $_POST['date'];
$author = $_POST['author'];
$post_image = $_FILES["image"]["name"];
$post_image_temp = $_FILES["image"]["tmp_name"];
$image = "";
$content = $_POST['content'];
$tags = $_POST['tags'];
$category = $_POST['category'];
$comments = 5;
$post_status = $_POST['status'];
move_uploaded_file($post_image_temp, "../uploads/$image");
$query = "INSERT INTO posts(title,date,author,image,content,tags,category,comments,status)";
$query .= "VALUES('$title','$date','$author','$post_image','$content','$tags','$category','$comments ',$post_status')";
$add_post = mysqli_query($connection, $query);
confirm($add_post);
}
?>
Here is the screenshot for the error am new to php thou