title: refresh div to retrieve information from database without refreshing wholepage
body: <p>I would like to refreash the div <code>auto</code> every 2 seconds without reloading the page how can i do this with jquery i did try some solutions but they did not work if can help that would be great</p>
  
  <p><strong>conversation.php</strong></p>
  
  <pre><code>&lt;?php
          $hash =$run_con['hash'];
          while($run_message = mysql_fetch_assoc($message_query))
              {
  
                   $from_id = $run_message['from_id'];
                   $message = $run_message['message'];
  
                  $user_query = mysql_query("SELECT `username` FROM `users` WHERE `id`='$from_id'");
                  $run_user = mysql_fetch_array($user_query);
                  $from_username = $run_user['username'];
  
  
                  echo "&lt;div id='auto'&lt;p&gt;&lt;b&gt;$from_username&lt;/b&gt;&lt;br /&gt;$message&lt;/p&gt;  &lt;/div&gt;"; //reload this part every 2 seconds
  
  
              }
      ?&gt;
  
  &lt;script&gt;
      $(document).ready(function(){
      setInterval(function(){
      $("#auto").load('conversation.php'+$hash)
      }, 2000);
      });
   &lt;/script&gt;
  </code></pre>