Why i don't get result in my data base

Closed
Report
-
<?php
include('includes/connect.php');


if(isset($_POST['submit'])){

$title = $_POST['title'];
$date = DATE('y-m-d');
$author = $_POST['author'];
$content = $_POST['content'];
$image_name = $_FILES['image']['name'];
$image_type = $_FILES['image']['type'];
$image_size = $_FILES['image']['size'];
$image_tmp = $_FILES['image']['tmp_name'];

if($title == '' or $author =='' or $content ==''){
echo "<script>alert('Any filed is empty')</script>";
exit();
}
if($image_type=="image/jpeg" or $image_type=="image/png" or $image_type=="image/gif"){

if($image_size<=50000){
move_uploaded_file($image_tmp,"images/$image_name");
}
else {
echo "<script>alert('image is larger, only 50kb size is allowed')</script>";
}
}
else {
echo "<script>alert('image type is invalid')</script>";
}


$query = "insert into posts (post_title,post_date,post_author,post_image,post_content) values ('$title','$date','$author','$image_name','$content')";

if(mysql_query($query)){
echo "<center><h1>Post has been Published</h1></center>";

}

}
?>