PHP Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax
<p>I am creating a separate page in my portal from where i can upload the images to my database. but while submitting the image i am getting the following <strong>Error</strong>: </p>

<blockquote>
  <p>"error in INSERT into 'images_tbl' ('images_path','submission_date')
  VALUES ('images/24-01-2016-1453612538.jpg','2016-01-24') 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 ''images_tbl'
  ('images_path','submission_date') VALUES ('images/24-01-2016-14' at
  line 1"</p>
</blockquote>

<p>I am getting this error in my saveimage.php file. Why exactly this error is?</p>

<p>Here is my HTML code:</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Image Upload&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;form action="saveimage.php" enctype="multipart/form-data" method="post"&gt;
&lt;table style="border-collapse: collapse; font: 12px Tahoma;" border="1" cellspacing="5" cellpadding="5"&gt;
    &lt;tbody&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;input name="uploadedimage" type="file"&gt;
        &lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
        &lt;td&gt;
            &lt;input name="Upload Now" type="submit" value="Upload Image"&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>PHP code of my saveimage.php file:</p>

<pre><code>&lt;?php
include("mysqlconnect.php");

    function GetImageExtension($imagetype)
    {
       if(empty($imagetype)) return false;
       switch($imagetype)
       {
           case 'image/bmp': return '.bmp';
           case 'image/gif': return '.gif';
           case 'image/jpeg': return '.jpg';
           case 'image/png': return '.png';
           default: return false;
       }
    }

if (!empty($_FILES["uploadedimage"]["name"])) {

    $file_name=$_FILES["uploadedimage"]["name"];
    $temp_name=$_FILES["uploadedimage"]["tmp_name"];
    $imgtype=$_FILES["uploadedimage"]["type"];
    $ext= GetImageExtension($imgtype);
    $imagename=date("d-m-Y")."-".time().$ext;
    $target_path = "images/".$imagename;

if(move_uploaded_file($temp_name, $target_path)) {

    $query_upload="INSERT into 'images_tbl' ('images_path','submission_date') VALUES ('".$target_path."','".date("Y-m-d")."')";

    mysql_query($query_upload) or die("error in $query_upload ".mysql_error());  

}else{
   exit("Error While uploading image on the server");
} 
}
?&gt;
</code></pre>

<p>Code of my mysqlconnect.php file is:</p>

<pre><code>&lt;?php
/**********MYSQL Settings****************/
$host="localhost";
$databasename="demo";
$user="root";
$pass="";
/**********MYSQL Settings****************/

$conn=mysql_connect($host,$user,$pass);

if($conn)
{
$db_selected = mysql_select_db($databasename, $conn);
if (!$db_selected) {
    die ('Can\'t use foo : ' . mysql_error());
}
}
else
{
    die('Not connected : ' . mysql_error());
}
?&gt;
</code></pre>