title: mysql UPDATE with AJAX and PHP does not work in one of two same cases
body: <p>I am trying to update mysql table with AJAX and php script, but I am still receiving "304 Not modified" message. I have searched many questions here and also searched for it with google but without any luck... I am 100% sure all variables are sent with AJAX and received by PHP in correct form, I have checked it like this:</p>
  
  <pre><code>$tabulka=$_SESSION["uzivatel"];
  $slovensky=testVstupov($_POST["slovensky"]);
  $prelozene=testVstupov($_POST["prelozene"]);
  $druh=testVstupov($_POST["druh"]);
  $lekcia=testVstupov($_POST["lekcia"]);
  $reset=testVstupov($_POST["reset"]);
  $id=testVstupov($_POST["id"]);
  $nula=0;
  //echo $tabulka."#".$slovensky."#".prelozene."#".$druh."#".$lekcia."#".$reset."#".$id."#".$nula;
  
  function testVstupov($data)
  {
      $data=trim($data);
      $data=stripslashes($data);
      $data=htmlspecialchars($data);
      return $data;
  }
  </code></pre>
  
  <p>that echo is just to make sure all variables are filled with correct value</p>
  
  <p>Then I try to update table, but it results with 304 message, variable $hodnoty is returned empty:</p>
  
  <pre><code>$pripojenie=mysqli_connect("localhost","user","password","database");
  
  if (mysqli_connect_errno($pripojenie))
  {
  echo "Zlyhalo pripojenie do databázy: ".mysqli_connect_error();
  }
  if($reset == "false")
  {
      $hodnoty = mysqli_query($pripojenie, "UPDATE `$tabulka` SET slovensky=$slovensky, preklad=$prelozene, druh=$druh, lekcia=$lekcia WHERE id='$id'");
  }
  
  if(mysqli_error()) 
  { 
  die('Zápis do databázy sa nepodaril. Chyba: ' . mysqli_error() ); //skjurajozimy.
  }
  //ukncenie spojenia s databazou
  mysqli_close($pripojenie);
  </code></pre>
  
  <p>Same code in other php file but only to modify different collumns in same table works. This code works:</p>
  
  <pre><code>$pripojenie=mysqli_connect("localhost","user","password","database");
  
  if (mysqli_connect_errno($pripojenie))
  {
  echo "Zlyhalo pripojenie do databázy: ".mysqli_connect_error();
  }
  
  $vysledok=mysqli_query($pripojenie, "SELECT skusane,spravne FROM `$tabulka` WHERE preklad='$data1'");
  if(mysqli_error()) 
  { 
  die('Výpis z databázy sa nepodaril. Chyba: ' . mysqli_error() ); //`skjurajozimy`.
  }
  
  $hodnoty = mysqli_fetch_array($vysledok);
  $noveSkusane = $hodnoty['skusane']+1;
  $noveSpravne = $hodnoty['spravne']+$data2;
  $uspesnost = round($noveSpravne*$noveSkusane);
  
  $hodnoty = mysqli_query($pripojenie, "UPDATE `$tabulka` SET skusane=$noveSkusane, spravne=$noveSpravne, uspesnost=$uspesnost WHERE preklad='$data1'");
  if(mysqli_error()) 
  { 
  die('Zápis do databázy sa nepodaril. Chyba: ' . mysqli_error() ); //`skjurajozimy`.
  }
  //ukncenie spojenia s databazou
  mysqli_close($pripojenie);
  </code></pre>
  
  <p>collumns in my table are: <em>id slovensky preklad druh lekcia skusane spravne uspesnost</em> , where id is autoincrement.</p>
  
  <p>Please, any suggestions, why update code doesn't work?</p>