title: jquery telling me something is added to a table but it is not
body: <p>I have a form that is supposed to add data to a table when you click the button and a pop up comes up telling you it was added or there was a problem. A user can put data into the text areas and click on rate the box comes up and tells you it was added but when I look at the table it has not been added. After going through the code I am unable to see anything that jumps out at me. </p>
  
  <p>Here is the form</p>
  
  <pre><code>    &lt;script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form id="add-rateing"&gt;
   &lt;input type="text" name="MOVIE_ID"&gt;
    &lt;input type="text" name="USER_ID"&gt;
  &lt;input type="submit" value="rate"&gt;
  &lt;/form&gt;
  &lt;script type="text/javascript"&gt;
  $("#add-rateing").submit(function(){
  event.preventDefault()
  
      addrateing();
  
     });
  
  function addrateing()
  {
  var movie_id_s    = $("#add-rateing [name='MOVIE_ID']").val();
  var user_id_s   = $("#add-rateing [name='USER_ID']").val();
  var errors  = '';
  
  $.ajax({
      type    : "GET",
      url     : "movie_watched.php",
      data    : { movie  : movie_id_s,
                  user : user_id_s, },
      cache   : false, timeout: 10000,
  
      success  : function() {
          alert("added");
      },
      error    : function() {
          alert("there is a problom");
      },
      complete : function() {
      }
  
  });
  };
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>here is the movie_watched.php</p>
  
  <pre><code>    &lt;?php
  include"scripts/connect.php" ;
  mysql_connect('localhost',$username,$password);
  @mysql_select_db($database) or die( "Unable to select database");
  
  $movie = mysql_real_escape_string($_POST['MOVIE_ID']);
  $user = mysql_real_escape_string($_POST['USER_ID']);
  $error = '';
  
  $query=mysql_query"INSERT INTO rateing (movie_id, user_id) VALUES ('".$movie."', '".$user."')";
  
  if (!mysql_query($query, $conn))
  {
  $error = mysql_error();
  $return['error'] = $error;
  echo json_encode($return);
  mysql_close($conn);
  }
  else
  {
  $success = "Thank you for playing";
  $return['mysql'] = $success;
  echo json_encode($return);
  mysql_close($conn);
  }
  
  ?&gt;
  </code></pre>
  
  <p>Thank you.</p>