Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $con=mysqli_connect('localhost','root','p4ssw0t','carousel');
- error_reporting(0);
- $kode_artikel = $_GET['id'];
- $sql_news = "SELECT * FROM berita WHERE id='$kode_artikel'";
- $qry_news = mysqli_query($sql_news);
- $data_news = mysqli_fetch_assoc($qry_news);
- print_r($data_news);
- $data_berita = $data_news['konten'];
- ?>
- <div class="row">
- <div class="col-xs-12">
- <div class="box">
- <div class="box-header">
- <h3 class="box-title">Detail Konten : </h3>
- </div><!-- /.box-header -->
- <div class="box-body">
- <table id="example1" class="table table-bordered table-striped">
- <thead>
- <tbody>
- <tr>
- <td>
- <?php
- foreach ($data_news as $dota) {
- echo $dota['konten'];
- }
- ?>
- </td>
- </tr>
- </thead>
- </tbody>
- </table>
- </div><!-- /.box-body -->
- </div><!-- /.box -->
- </div><!-- /.col -->
- </div><!-- /.row -->
Advertisement
Add Comment
Please, Sign In to add comment