Skip to content

Instantly share code, notes, and snippets.

@wichaksono
Created January 27, 2018 05:30
Show Gist options
  • Save wichaksono/8822c12e3094971756b19615ffe43d3c to your computer and use it in GitHub Desktop.
Save wichaksono/8822c12e3094971756b19615ffe43d3c to your computer and use it in GitHub Desktop.
<?php
// koneksi database
require 'config.php';
?>
<html>
<head>
<title>Sistem Vote</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="vote-container">
<table>
<tr>
<th colspan="2">Cantik Yang Mana ?</th>
</tr>
<tr>
<?php
$sql = "SELECT * FROM vote_opsi";
$query = $connect->query($sql);
while ( $row = $query->fetch_assoc() ) : ?>
<td>
<div class="persentase"></div>
<a href="vote-count.php?nomer=<?php echo $row['id_opsi'];?>">
<img src="<?php echo $row['thumbnail'];?>" width="150" alt=""/>
<p><?php echo $row['nama_opsi'];?></p>
</a>
</td>
<?php endwhile; ?>
</tr>
</table>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment