Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- </head>
- <body>
- <div id="post-wrapper">
- <?php include "post.php"; ?>
- </div>
- </body>
- </html>
- <script>
- $(document).ready(function (){
- setInterval(function(){
- $('#post-wrapper).load("post.php");
- },2000);
- });
- </script>
- #############
- post.php
- <?php foreach ($rows as $row): ?>
- <div class="post" id="<?= $row['postid']; ?>">
- <div class="content">
- <div class="content-image"><?= $row['postimage']; ?></div>
- <div class="content-text"><?= $row['content']; ?></div>
- </div>
- <div class="likes">
- <span></span>
- </div>
- </div>
- <?php endforeach; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement