Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'connect.php';
- $title = null;
- $text = null;
- $select = mysqli_query($con, "SELECT * FROM posts ORDER BY idp DESC");
- // $conta = mysqli_num_rows($select);
- if (mysqli_num_rows($select) <= 0) {
- echo "<script>alert('Nao ha posts')</script>";
- }else{
- while ($in = mysqli_fetch_array($select)) {
- $title = $in['titulo'];
- $text = $in['texto'];
- $id = $in['idp'];
- }
- }
- ?>
- <div class="wrap-p">
- <div id="title"><?php echo $title;?></div>
- <div id="texto"><?php echo $text;?></div>
- <div id="texto"><?php echo "$id";?></div>
- </div>
- </div><br><br>
- <div class="wrap-p">
- <div id="title"><?php echo $title;?></div>
- <div id="texto"><?php echo $text;?></div>
- <div id="texto"><?php echo "$id";?></div>
- </div>
- </div><br><br>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement