outattacker

Detail Konten

Jan 28th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. <?php
  2. $con=mysqli_connect('localhost','root','p4ssw0t','carousel');
  3. error_reporting(0);
  4. $kode_artikel = $_GET['id'];
  5. $sql_news = "SELECT * FROM berita WHERE id='$kode_artikel'";
  6. $qry_news = mysqli_query($sql_news);
  7. $data_news = mysqli_fetch_assoc($qry_news);
  8. print_r($data_news);
  9. $data_berita = $data_news['konten'];
  10. ?>
  11. <div class="row">
  12. <div class="col-xs-12">
  13. <div class="box">
  14. <div class="box-header">
  15. <h3 class="box-title">Detail Konten : </h3>
  16. </div><!-- /.box-header -->
  17. <div class="box-body">
  18. <table id="example1" class="table table-bordered table-striped">
  19. <thead>
  20. <tbody>
  21. <tr>
  22. <td>
  23. <?php
  24. foreach ($data_news as $dota) {
  25. echo $dota['konten'];
  26. }
  27. ?>
  28. </td>
  29. </tr>
  30. </thead>
  31. </tbody>
  32. </table>
  33. </div><!-- /.box-body -->
  34. </div><!-- /.box -->
  35. </div><!-- /.col -->
  36. </div><!-- /.row -->
Advertisement
Add Comment
Please, Sign In to add comment