Skip to content Skip to sidebar Skip to footer

Posts Overlapping

Now i dont know if this is simple or hard. If its just css or php code i need But basically i have posting system and users can comment on posts. In the comments page it shows org

Solution 1:

Wrong (Your code):

<?php echo "&nbsp;".$r['message']."" ; } ?> </div> 
</div>

Correct:

<?php echo "&nbsp;".$r['message']."" ; ?> </div> 
</div>
<?php } ?>

You were opening multiple DIVs in your while loop but only closing two.


Solution 2:

Similarly to Cobra_Fast's reply, it seems that the positioning of your divs seemed to be causing the problem, and also the position of your while loop.

Try replacing the replies section with the following and let me know if it is any better.

<?php    
echo "<h3>Replies...</h3>";          
$sql = mysql_query("SELECT * FROM replies WHERE thread = '".mysql_real_escape_string($_GET['id']) . "'") or die(mysql_error());          
while($r = mysql_fetch_array($sql)) {   
    ?>
    <div class="message">       
    $posted = date("jS M Y h:i",$r['posted']); 
    echo $r['author']." &nbsp; ".$posted;
    ?>
    <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="<?php echo $r['message']; ?>">
        Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
    </div>
    <div class="message2">
    <?php 
        echo "&nbsp;".$r['message'];
    ?>
    </div>
<?php   
}
?>

Post a Comment for "Posts Overlapping"