title: Sql Statement from PHP isnt inserting into Database but doesnt give an error
body: <p>Thanks to this site i could manage to solve my problems, but my statement isnt going through on my database, but when i copy it and paste it directly to my database, it inserts without any problem. Here my code:</p>
  
  <pre><code>&lt;?php
  $ip   = "***"; //MySQL Server IP
  $user = "***"; //MySQL user
  $pw   = "***"; //MySQL password
  $db   = "***"; //Database  
  $sql_filter = "";
  
  
  $con = mysqli_connect($ip, $user, $pw, $db);    
  if (mysqli_connect_errno()) 
  {
      echo "Failed to connect to MySQL: " . mysqli_connect_error();
      exit();
  }   
  
  function register()
  {
      $username = $_POST[username];
      $vorname = $_POST[vorname];
      $nachname = $_POST[nachname];
      $geschlecht = $_POST[geschlecht];
      $geburtsdate = $_POST[geburtsdatum];
      $password = $_POST[password];
      $email = $_POST[email];
  
      if($email!="" and $password!="" and $username!="" and $password==$_POST["password_confirm"])
      {           
  
          $sql_filter = "INSERT INTO `tblUser`(`UserID`, `UserName`, `Vorname`, `Nachname`, `EMail`, `Geschlecht`,`Password`) VALUES ('','$username','$vorname','$nachname','$email','$geschlecht','$password')";
  
          $_SESSION['filter'] = $sql_filter;
          $page_query = mysqli_query($con, $_SESSION['filter']);
          $page_nums = mysqli_num_rows($page_query);
  
          //header('Location: index.php');
  
          echo $sql_filter;
          echo $_SESSION['filter'];
      }
      else
      {
          header('Location: 404.html');
      }
  }   
  
  if(isset($_POST['submit']))
  {
      register();
  }
  
  mysqli_close($con);
  ?&gt;  
  </code></pre>