php - posts overlapping -



php - posts overlapping -

now dont know if simple or hard. if css or php code need have posting scheme , users can comment on posts. in comments page shows orginal post , 1 users have left (the comments) had 1 in there , fine added , looked this...

[1]: http://i.stack.imgur.com/2fixd.jpg can see completly different! heres code it...

<?php mysql_connect("localhost", "root", ""); mysql_select_db("test"); echo "<a href='untitled9.php'>go back...</a>"; ?> <br/><br/> <div class="message"> <?php $sql = mysql_query("select * threads id = '". mysql_real_escape_string($_get['id']) . "'") or die(mysql_error()); while($r = mysql_fetch_array($sql)) { $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 class="message2"><?php echo "&nbsp;".$r['message'].""; ?></div> <?php echo "likes: ".$r['votes_up']."&nbsp;"; echo "dislike: ".$r['votes_down']."";> </div> <br/> <hr width="725px"> <?php echo "<h3>replies...</h3>"; ?> <div class="message"><?php $sql = mysql_query("select * replies thread = '". mysql_real_escape_string($_get['id']) . "'") or die(mysql_error()); while($r = mysql_fetch_array($sql)) { $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 class="message2"> <?php echo "&nbsp;".$r['message']."" ; } ?> </div> </div> <hr width="725px"> <form action="newreply.php" method="post"> name: <input type="text" name="author"> <input type="hidden" value="<?php echo $_get['id']; ?>" name="thread"><br> message:<br><textarea cols="60" rows="5" name="message"></textarea><br> <input type="submit" value="post reply"> </form>

code looks messy on here. tried editing couldnt much better. bascially want know how prevent (the overlapping) happening? edit * css

.message { width: 500px; color: black; background: white; padding:8px; border:1px solid white; margin:5px auto; -moz-border-radius:8px; } .message2 { background-color: grey; }

it looks me though posting within sec php function have code pretty much same individual post , displays i.e. many want. im wondering there need add/change

wrong (your code):

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

correct:

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

you opening multiple divs in while loop closing two.

php html css

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -