Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Collage</title>
- <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
- </head>
- <body>
- <?php
- $servername = "localhost";
- $username = "root";
- $password = "Silpakorn60";
- $dbname = "db13580248";
- $conn = new mysqli($servername, $username, $password, $dbname);
- $sql ="SELECT * FROM student_tbl";
- $sql ="SELECT * FROM vote_tbl";
- $result = $conn->query($sql);
- $conn->close();
- ?>
- <div class="container">
- <div class="page-header"><h1>COLLAGE</h1> <small>By Student in Silpakorn University</small></div>
- <div class="row">
- <?php
- while($row = $result->fetch_assoc()){
- ?>
- <div class="col-md-3">
- <div class="thumbnail">
- <img src="collage-crop/<?php echo $row["id_group"]?>.jpg" class="group list-group-image img-rounded"> <!-- echo $row["id_group"] -->
- <div class="caption">
- <h3 class="group list-item-heading"><?php echo $row["id_group"]?></h3>
- <p class="group list-item-text"><?php echo $row["topics"]?></p>
- <div class="row">
- <div class="col-sm-4">
- <p><strong> <?php echo $row["likeA"]?> VOTE</strong></p>
- </div>
- <div class="col-sm-8">
- <div class="text-right">
- <a class="btn btn-info" href="detail.php?groupA=<?php echo $row["id_group"]?>" role="button">Detail</a>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <?php
- }
- ?>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement