这个PHP代码有什么错误? [重复]

This question already has an answer here:

<?php   
    include("conn.php");
    if(isset($_POST['save'])){

        $title=$_POST['title'];
        $genre=$_POST['genre'];
        $year=$_POST['year'];

        $sql = "INSERT INTO `add`(`title`, `genre`, `year`) VALUES ('$title','$genre','$year')" ;
            $query = mysql_query($sql);
        if (empty ($_POST["title"] || ["genre"] || ["year"])){
            echo "You did not fill out the required fields.";
        }
        else ($query){
            echo "Successfully Inserted . <a href = 'index.php'> Ok </a>";
        }

    }


?>

Every time I run the code then this is the error stated:

"Parse error: syntax error, unexpected '{' in C:\xampp\htdocs\Practise PHOBIAmming Skills\sample1\add.php on line 24"

</div>

You have added condition to else

else ($query){

remove it or make it elseif according to your logic