How to solve this error PHP Parse error: syntax error, unexpected ';'? : <p>I think the insert query should ends with semicolon as the similar code is working for another form. But it shows this error:</p>

<pre><code>PHP Parse error: syntax error, unexpected ';'
</code></pre>

<p>Here is my piece of PHP script for insert data into database from a form.</p>

<pre><code>if((!empty($name) &amp;&amp; !empty($location) &amp;&amp; !empty($fulladdress) &amp;&amp; !empty($ownername) &amp;&amp; !empty($ownercontact) &amp;&amp; !empty(category) &amp;&amp; 
                    ($invalidphflag==true) &amp;&amp; ($phoneflag==true) &amp;&amp; !empty($size) &amp;&amp; !empty($price) )
        {
                $insertquery= "INSERT INTO properties (name, location, address, owner_name, owner_no, size, price, category) 
                VALUES ('$name', '$location', '$fulladdress', '$ownername', '$ownercontact', '$size', '$price', '$category')";

            $query = mysqli_query($db, $insertquery);

            if($query)
            {
             $success= "Details submitted successfully.";
            }   



    }
</code></pre>
