title: How to reload a PHP Query with Jquery (Included Page)
body: <p>I have a small snippet which is a comment system. I am trying to make it so when I press submit, the form itself will refresh and so will the comments. </p>
  
  <p>I have tried using AJAX but I can't see anything actually initiating when I press "Submit".
  My <strong>frontpage.php</strong> includes each element of the player. 
  and here is the core for the <strong>player_comments.php:</strong></p>
  
  <pre><code>    &lt;script&gt;
  
  $(document).ready(function() { 
      var options = {
          url: '',
          target: '#comment-text', // target element(s) to be updated with server response
          type: 'post' // 'get' or 'post', override for form's 'method' attribute
      }; 
  
      // bind form using 'ajaxForm' 
      $('#song-comment-form').ajaxForm(options); 
  }); 
  
  &lt;/script&gt;
  
  &lt;?
  }
  if(isset($userId)) {
      /* logged in only */
  }
  
  $iComments = 0;
  $qComments = $db-&gt;query("
  SELECT songs_comments.*, user.id AS uId, user.username AS uName, user.avatar AS uAvatar
  FROM songs_comments LEFT JOIN user ON songs_comments.userid_from = user.id
  WHERE songs_comments.songid = '".$rSong-&gt;id."' ORDER BY songs_comments.id DESC");
  while ($rComments = $qComments-&gt;fetch_object()) {
      $showComments .= '
      &lt;img src="../'.makeAvatar($rComments-&gt;uId,$rComments-&gt;uAvatar,50).'" class="avatar float-left" alt&gt;
      &lt;div class="comment"&gt;
          &lt;div class="comment-text"&gt;'.$rComments-&gt;text.'&lt;/div&gt;
          &lt;div class="comment-footer"&gt;
              &lt;a href="/"&gt;'.$rComments-&gt;uName.'&lt;/a&gt; on '.dateStamp($rComments-&gt;time).'
          &lt;/div&gt;
          &lt;br style="clear:both;"&gt;
      &lt;/div&gt;
      ';
      $iComments++;
  } ?&gt;
  &lt;div id="player-song-comments-wrap"&gt;
      &lt;div id="player-song-comments-heading"&gt;&lt;img src="template/images/icons/comments.png" alt&gt; Comments&lt;/div&gt;
      &lt;div id="player-song-comments-sub-heading"&gt;
          &lt;?=isset($userId)?'&lt;a href="/" id="show-song-comment-form" class="float-right"&gt;Add comment&lt;/a&gt;':'&lt;a href="/register.php" class="modal float-right"&gt;Add comment&lt;/a&gt;'?&gt;
          &lt;span id="song-comments-num"&gt;&lt;?=$iComments?&gt;&lt;/span&gt; comments for "&lt;span id="song-comments-title"&gt;&lt;?=$rSong-&gt;title?&gt;&lt;/span&gt;"
          by &lt;span id="song-comments-artist"&gt;&lt;?=$rSong-&gt;artist?&gt;&lt;/span&gt;
      &lt;/div&gt;
      &lt;hr&gt;
      &lt;form id="song-comment-form"&gt;
          &lt;input type="hidden" value="&lt;?=$rSong-&gt;id?&gt;" class="song-id"&gt;
          &lt;textarea class="editor" id="song-comment-textarea"&gt;&lt;/textarea&gt;&lt;br&gt;
          &lt;input type="submit" value="Submit"&gt;&lt;input type="button" value="Cancel" id="hide-song-comment-form"&gt;
          &lt;hr&gt;
      &lt;/form&gt;
      &lt;div id="player-song-comments"&gt;
          &lt;?=$showComments?&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>How do I make it so that when I click submit, everything inside this include is reloaded? </p>