Parse error: syntax error, unexpected ‘$image_type’ (T_VARIABLE) in on line 66 [duplicate]

  mysqli, php
<?php
include("includes/connect.php");

if(isset($_POST['submit'])){
    
    $title = $_POST['title'];
    $date = date ('d/m/y');
    $author = $_POST['author'];
    $content = $_POST['content'];
    $image_name = $_FILE['image']['name'];
    $image_type = $_FILE['image']['type'];
    $image_size = $_FILE['image']['size'];
    $image_tmp = $_FILE['image']['tmp_name'];
    
    if($title =='' or $author =='' or $content==''){
        echo "<script>alert('any feild is empty')</script>";
    exit();
    }
    if ($image_type=="image/jpeg" or $image_type=="image/png"
    $image_type=="image/gif"){
        
        if($image_size>=50000){
            move_uploaded_image($image_tmp,"iamge/$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_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>";


}
    
?>

Source: Ask PHP

LEAVE A COMMENT