title: Parse error: syntax error, unexpected 'VALUES' (T_STRING) in C:\wamp2017\www\PHPCMS\categories.php
body: <p>I am new to php and sql. I am just trying to build a blog and I am getting error message when I try to run through localhost. I am using php version 7 and sql version 5.7. 
  I am getting error on line 26 which is this one </p>
  
  <p>please help me out. many thanks</p>
  
  <pre><code>&lt;?php require_once("Include/db.php"); ?&gt;
  &lt;?php require_once("Include/sessions.php"); ?&gt;
  &lt;?php require_once("Include/functions.php"); ?&gt;
  
  &lt;?php
  if(isset($_POST["Submit"])){
      $Category=mysqli_real_escape_string($_POST["Category"]);
  date_default_timezone_set("Europe/London");
  $CurrentTime=time();
  //$DateTime=strftime("%Y-%m-%d %H:%M:%S",$CurrentTime);
  $DateTime=strftime("%B-%d-%Y %H:%M:%S",$CurrentTime);
  $DateTime;
  $Admin="Admin";
  if(empty($Category)){
      $_SESSION["ErrorMessage"]="All Fields must be filled out";
      Redirect_to("categories.php");
  
  }elseif(strlen($Category)&gt;99){
      $_SESSION["ErrorMessage"]="Too long Name for category";
      Redirect_to("categories.php");
  
  }else{
  
          global $linkDB;
          $Query="INSERT INTO category(datetime,name,creatorname)"
          VALUES('$DateTime','$Category','$Admin');
          $Execute=mysqli_query($Query);
          if($Execute){
              $_SESSION["SuccessMessage"]="Category Added Successfully";
              Redirect_to("categories.php");
  }
  else{
              $_SESSION["ErrorMessage"]="Catrgory failed to Add";
              Redirect_to("categories.php");
  }
  }
  
  }
  
  ?&gt;
  &lt;!DOCTYPE&gt;
  
  &lt;html&gt;
      &lt;head&gt;
      &lt;title&gt;Manage Categories&lt;/title&gt;
          &lt;link rel="stylesheet" href="css/bootstrap.min.css"&gt;
          &lt;script src="js/jquery-3.2.1.min.js"&gt;&lt;/script&gt;
          &lt;script src="bootstrap.min.js"&gt;&lt;/script&gt;
          &lt;link rel="stylesheet" href="css/adminstyles.css"&gt;
      &lt;/head&gt;
  
      &lt;body&gt;
         &lt;div class="container-fluid"&gt;
         &lt;div class="row"&gt;
  
                  &lt;div class="col-sm-2"&gt;
                  &lt;h1&gt;My First Blog&lt;/h1&gt;
  
                  &lt;ul id="side_Menu" class="nav nav-pills nav-stacked"&gt;
  
                  &lt;li&gt;&lt;a href="admin_dashboard.php"&gt;
  
                  &lt;span class="glyphicon glyphicon-home"&gt;&lt;/span&gt;&amp;nbsp; Dashboard&lt;/a&gt;&lt;/li&gt;
  
                  &lt;li&gt;&lt;a href="#"&gt;&lt;span class="glyphicon glyphicon-list-alt"&gt;&lt;/span&gt;&amp;nbsp; Add New Post&lt;/a&gt;&lt;/li&gt;
  
                  &lt;li class="active"&gt;&lt;a href="categories.php"&gt;&lt;span class=" glyphicon glyphicon-tag "&gt;&lt;/span&gt;&amp;nbsp; Categories&lt;/a&gt;&lt;/li&gt;
  
                  &lt;li&gt;&lt;a href="#"&gt;&lt;span class="glyphicon glyphicon-user"&gt;&lt;/span&gt;&amp;nbsp; Manage Admins&lt;/a&gt;&lt;/li&gt;
  
                  &lt;li&gt;&lt;a href="#"&gt;&lt;span class="glyphicon glyphicon-comment"&gt;&lt;/span&gt;&amp;nbsp; Comments&lt;/a&gt;&lt;/li&gt;
  
                  &lt;li&gt;&lt;a href="#"&gt;&lt;span class="glyphicon glyphicon-equalizer"&gt;&lt;/span&gt;&amp;nbsp; Live Blog&lt;/a&gt;&lt;/li&gt;
  
                  &lt;li&gt;&lt;a href="#"&gt;&lt;span class="glyphicon glyphicon glyphicon-log-out"&gt;&lt;/span&gt;&amp;nbsp; Logout&lt;/a&gt;&lt;/li&gt;
  
          &lt;/ul&gt;
  
  
          &lt;/div&gt; &lt;!--Ending of Side area--&gt;
          &lt;div class="col-sm-10"&gt;
          &lt;h1&gt;Manage Categories&lt;/h1&gt;
          &lt;div&gt;&lt;?php echo Message();
                  echo SuccessMessage();
                  ?&gt;
          &lt;div&gt;
          &lt;form action="categories.php" method="post"&gt;
          &lt;fieldset&gt;
                      &lt;div class="form-group"&gt;
          &lt;label for="categoryname"&gt;Name:&lt;/label&gt;
          &lt;input class="form-control" type="text" name="Category" id="catrgoryname" placeholder="Name"&gt;
          &lt;/div&gt;  
          &lt;input class="btn btn-success btn-block" type="Submit" name="Submit" value="Add New Category"&gt;
          &lt;/fieldset&gt;
          &lt;be&gt;
  &lt;/form&gt;
  
  
                &lt;/div&gt;  &lt;!--ending of main area--&gt;
  
  
          &lt;/div&gt; &lt;!--ending of row--&gt;
  
          &lt;!--end of container --&gt;
  
          &lt;div id="Footer"&gt;
          &lt;hr&gt;&lt;p&gt;Blog by A R Khalid ¦ &amp;copy;Media Shark&lt;/p&gt;
          &lt;a style="color: white; text-decoration: none; pointer; font-weight:bold;"&gt;
  
          &lt;div style="height: 10px; background:#27AAE1;"&gt;&lt;/div&gt;
  
      &lt;/body&gt;
  
  
  
  &lt;/html&gt;
  </code></pre>