Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //error_reporting(1);
- //====JANGAN LUPA DI GANTI ISINYA================
- $mysqli = new mysqli("localhost", "root", "", "temp_main");
- if(@isset($_GET['act']))$show=$_GET['act'];
- //=========berikut ini adalah list adminnya============
- if(@isset($show) && $show=='admin')
- {
- ?>
- PLEASE WAIT
- <?php
- }
- if(!isset($show))
- {
- ?>
- <a href='?act=admin'>Halaman Admin</a>
- <h1>BUKU TAMU</h1>
- <h2>Oleh G. M. Wibisono</h2>
- <?php
- $sql="select * from bukutamu
- where stat=1
- order by id desc";
- $q=$mysqli->query($sql);
- if(!$q)
- {
- die($mysqli->error);
- }
- if(@ $q->num_row==0)
- {
- echo "<h3>data masih kosong</ h3>";
- }
- while ($row = $q->fetch_assoc())
- {
- $detail=json_decode($row['detail'], true);
- ?>
- <div>
- <h3><?php echo $detail['nama'];?>
- (<?php echo $detail['email'];?>)</h3>
- <h4><?php
- /* BUAT KEAMANAN */
- echo strip_tags($row['pesan']);?></h4>
- </div>
- <?php
- }
- ?>
- <a href='?act=admin'>Halaman Admin</a>
- <?php
- } //if(!isset($show))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement