title: can anyone fix this. jQuery $.post
body: <p>i have a form like this (already add jquery latest)</p>
  
  <pre><code>echo '&lt;form name="chat" id="chat" action="/pages/guicsdl.php" method="post"&gt;'; 
  echo bbcode::auto_bb('chat', 'text'); 
  echo '&lt;textarea rows="3" name="text" id="text"&gt;&lt;/textarea&gt;&lt;br/&gt;'; 
  echo '&lt;input type="hidden" name="trave" value="'.$trave.'" /&gt;&lt;input type="submit" name="submit" value="Gửi" /&gt;&lt;/form&gt;';
  </code></pre>
  
  <p>and the js</p>
  
  <pre><code>$(document).ready(function() { 
      $("chat").submit(function(){ 
          $.post('/pages/guicsdl.php', $("#chat").serialize() ); 
      }); 
  });
  </code></pre>
  
  <p>and the file guicsdl.php</p>
  
  <pre><code>if(isset($_POST['submit'])) { 
      $noidung = functions::check($_POST['text']); 
      mysql_query("INSERT INTO `status` SET `user_id`='".$user_id."', `text`='".$noidung."', `time`='".time()."'"); 
      mysql_query("UPDATE `users` SET `tongchat`= tongchat+1 WHERE id = '".$user_id."' ");
      $trave = isset($_POST['trave']) ? base64_decode($_POST['trave']) : '';     
      header("Location: $trave"); 
  } 
  </code></pre>
  
  <p>i only want when i submit the form, the page doesn't refresh, the data insert to database. can any one help me fix? pls, and thanks. sorry for bad english.</p>