PHP/JavaScript post to top?
<p>I have a comment system written in PHP and JavaScript but each time I post the comment goes to the bottom. How do I make it appear at the top?</p>

<p>Here is my code:</p>

<p>The PHP code:</p>

<pre><code>&lt;?php
$sql = mysql_query( "SELECT * FROM `comments` WHERE perma_id = '$permalink' ORDER BY `date` DESC" );
$count = mysql_num_rows( $sql );
?&gt;

&lt;h2 class="comments"&gt;&lt;?php echo $count; ?&gt; Comments&lt;/h2&gt;

&lt;div id="flash"&gt;&lt;/div&gt;

&lt;ol id="update" class="timeline"&gt;

&lt;?php
while( $row = mysql_fetch_assoc( $sql ) ) {
    $userSql = mysql_query( "SELECT * FROM `members` WHERE `id` = '$row[userid]'" );
    $userRow = mysql_fetch_assoc( $userSql );
    $name = $userRow[ 'userid' ];
    $comment = $row[ 'comment' ];
    $cDate = $row[ 'date' ];
    $icon = $userRow[ 'icon' ];
?&gt;
&lt;li class="box"&gt;
    &lt;div class="left"&gt;&lt;a href="&lt;?php echo $site_url . '/wall/' . $name; ?&gt;"&gt;&lt;img src="&lt;?php echo $site_url . '/' . $icon; ?&gt;"/&gt;&lt;/a&gt;&lt;/div&gt;
    &lt;div class="right"&gt;
        &lt;div class="name"&gt;&lt;a href="&lt;?php echo $site_url . '/wall/' . $name; ?&gt;"&gt;&lt;?php echo $name;?&gt;&lt;/a&gt; said...&lt;/div&gt;
        &lt;div class="date"&gt;&lt;?php echo date("M d, Y g:i a", $cDate); ?&gt;&lt;/div&gt;
        &lt;div class="clearfix"&gt;&lt;/div&gt;
        &lt;div class="comm"&gt;
            &lt;div class="inside"&gt;
                &lt;?php echo $comment; ?&gt;
            &lt;/div&gt;  
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/li&gt;
&lt;?php
}
?&gt;
</code></pre>

<p>The JavaScript code:</p>

<pre><code>$(function() {
$('.com_submit').click(function() {
    var comment = $("#comment").val();
    var user_id = $("#user_id").val();
    var perma_id = $("#perma_id").val();
    var dataString = { comment: comment, user_id: user_id, perma_id: perma_id };
    if(comment=='') {
        alert('Please Give Valid Details');
    }
    else {
        $("#flash").show();
        $("#flash").fadeIn(400).html('&lt;img src="../images/ajax-loader.gif" align="left" /&gt; Loading Comment');
        $.ajax({
            type: "POST",
            url: "../commentajax.php",
            data: dataString,
            cache: false,
            success: function(html){
                $("ol#update").append(html);
                $("ol#update li:first").fadeIn("slow");
                $("#flash").hide();
            }
        });
    }
    return false;
}); 
});
</code></pre>

<p>I have <code>li:first</code> but it does not make it at the top</p>
