title: Display message without reloading page
body: <p>My problem is every time i want to show a new message i have to reload this page to show new messages but I wanna show new messages without reloading page can i achieve this from <code>JQuery</code>. Please help me</p>
  
  <p><strong>This part is where the messages are shown</strong></p>
  
  <pre><code>$message_query= mysql_query ("SELECT `from_id`, `message` FROM `messages` WHERE `group_hash`='$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;p&gt;&lt;b&gt;$from_username&lt;/b&gt;&lt;br /&gt;$message&lt;/p&gt;";// this is the place where the message is displayed
        }
  </code></pre>
  
  <p><strong>This part is where i click the submit button to send the message</strong></p>
  
  <pre><code>&lt;form method="POST"&gt;
          &lt;?php
          if(isset($_POST['message']) &amp;&amp; !empty($_POST['message']))
      {
       $new_message = $_POST['message'];
          mysql_query("INSERT INTO `u313495632_test`.`messages` (`id`, `group_hash`, `from_id`, `message`) VALUES ('', '$hash', '$my_id', '$new_message');");
          header('Location: conversation.php?hash='.$hash);
      }
  
      ?&gt;
      Enter Message :&lt;br/&gt;
      &lt;textarea name="message" rows='4' cols='30'&gt;&lt;/textarea&gt;
      &lt;br&gt;&lt;br&gt;
      &lt;input type="submit" value="send message" /&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>This is how the page looks like</p>
  
  <p><a href="https://i.stack.imgur.com/yoibb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yoibb.png" alt="enter image description here"></a></p>