I am currently working on a PHP script to upload an image to a mysql database and I am getting a syntax error on line 13 of my code that states Unexpected T_IF. I am relatively new to PHP and I am struggling to work out what is causing it. The code is as follows;
    <head>
        <title>File Upload To Database</title>
    </head>
    <body>
        <form action="index.php" method="POST" enctype="multipart/form-data">
            <input type="file" name="image"><Input type="submit" name="submit" value="Upload">
        </form>
        <?php>
        if(isset($_POST['submit']))
            {
                mysql_connect("localhost","appuser1","******");
                mysql_select_db("PHP_Sig_test_app");
                $imageName = mysql_real_escape_string($FILES["image"]["name"]);
                $imageData = mysql_real_escape_string(file_get_contents($_FILES["image"]["tmp_name"]));
                $imageType = mysql_real_escape_string($FILES["image"]["type""]);
                if(substr($imageType,0,5) == "image)
                {
                    mysql_query("INSERT INTO 'Data' Values('','$imageName','$imageData')";
                    echo "image uploaded";
                }
                else
                {
                    echo "Only Images can be Inserted"
                }    
            }
        ?>
    </body>
</html>
Thanks
 
     
     
    