paano kaya to kasi kapag nag ppost ako ng content bumababa lang sa sya sinundan nya post content. gusto ko po mangyari is kapag nagpost ako is kung anu lang yun post content ko yun lang po mag didisplay sakali po gusto ko ulit mag post ng content is iba nman mag didisplay..
<?php
if (isset($_POST['post'])){
$page_content = $_POST ['post_content'];
mysqli_query($con,"INSERT INTO post (comment,date_created,user_id) values ('$page_content','".strtotime(date("Y-m-d h:i:sa"))."','$username') ")or die(mysqli_error());
}
?>
<?php
$query = mysqli_query($con, "SELECT * ,UNIX_TIMESTAMP() - date_created AS TimeSpent FROM post LEFT JOIN registration on registration.user_id = post.user_id ORDER BY date_created DESC ") or die (mysqli_error());
while($post_row = mysqli_fetch_array($query)){
$id = $post_row['comment_id'];
$upid = $post_row['user_id'];
$posted_by = $post_row['username'];
?>
<div class="container col-md-8">
<a style="text-decoration:none; float:left;" href="deletepost.php<?php echo '?id='.$id; ?>">
<h3>Posted by: <a href="#"> <?php echo $posted_by; ?></a></h3>
<br><h3><?php echo $post_row['comment']; }?></h3>
</div>
<?php
if (isset($_POST['post'])){
$page_content = $_POST ['post_content'];
mysqli_query($con,"INSERT INTO post (comment,date_created,user_id) values ('$page_content','".strtotime(date("Y-m-d h:i:sa"))."','$username') ")or die(mysqli_error());
}
?>
<?php
$query = mysqli_query($con, "SELECT * ,UNIX_TIMESTAMP() - date_created AS TimeSpent FROM post LEFT JOIN registration on registration.user_id = post.user_id ORDER BY date_created DESC ") or die (mysqli_error());
while($post_row = mysqli_fetch_array($query)){
$id = $post_row['comment_id'];
$upid = $post_row['user_id'];
$posted_by = $post_row['username'];
?>
<div class="container col-md-8">
<a style="text-decoration:none; float:left;" href="deletepost.php<?php echo '?id='.$id; ?>">
<h3>Posted by: <a href="#"> <?php echo $posted_by; ?></a></h3>
<br><h3><?php echo $post_row['comment']; }?></h3>
</div>