title: error occurred during data insert in mysql
body: <p>my code -</p>
  
  <pre><code>require 'database.php';
  $uid = $_SESSION['UserId'];
  $title = $_POST['imgtitle'];
  $tag = $_POST['imgtag'];
  $date = date("d-m-y");  
  
  $q = "INSERT into album (`o_id`, `title`, `src`, `tag`, `date`)
  VALUES('$uid', '$title', '$image_name', '$tag', '$date'";
  
  $result = $mysqli-&gt;query($q) or die(mysqli_error($mysqli));
  
  if ($result) 
      {   
          echo "&lt;h1&gt;File Uploaded Successfully! Upload more...!&lt;/h1&gt;";
      }
  </code></pre>
  
  <p>my <code>database.php</code>-</p>
  
  <pre><code>&lt;?php
  
  $db_name = "szdb";
  $db_server = "localhost";
  $db_user = "root";
  $db_pass = "";
  
  $mysqli = new MySQLi($db_server, $db_user, $db_pass, $db_name) or die(mysqli_error());
  
  ?&gt;
  </code></pre>
  
  <p><strong>ERROR-</strong>
  <code>You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2</code></p>