Mohon dibantu, ada yang bisa memperbaiki script saya ini. saya bermaksud untuk menampilkan kategori yang berelasi ditabel topik. tapi saya tidak tau script ya, saya sudah coba menggunakan beberapa script yang yang dapat tapi tidak berhasil juga.
  1. <?php
  2. error_reporting(0);
  3. include 'koneksi.php';
  4. session_start();
  5. ?>
  6. <!DOCTYPE html>
  7. <html lang="en">
  8.  
  9. <head>
  10. <meta charset="utf-8">
  11. <meta name="viewport" content="width=device-width, initial-scale=1">
  12. <title>Forum Diskusi</title>
  13.  
  14. <!-- Bootstrap -->
  15. <link href="css/bootstrap.min.css" rel="stylesheet">
  16.  
  17. <!-- Custom -->
  18. <link href="css/custom.css" rel="stylesheet">
  19.  
  20. <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  21. <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  22. <!--[if lt IE 9]>
  23. <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
  24. <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
  25. <![endif]-->
  26.  
  27. <!-- fonts -->
  28. <link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
  29. <link rel="stylesheet" href="font-awesome-4.0.3/css/font-awesome.min.css">
  30.  
  31. <!-- CSS STYLE-->
  32. <link rel="stylesheet" type="text/css" href="css/style.css" media="screen" />
  33.  
  34. <!-- SLIDER REVOLUTION 4.x CSS SETTINGS -->
  35. <link rel="stylesheet" type="text/css" href="rs-plugin/css/settings.css" media="screen" />
  36.  
  37. </head>
  38. <body>
  39.  
  40. <div class="container-fluid">
  41. <?php include 'header.php'; ?>
  42. <section class="content">
  43. <div class="container">
  44. <br>
  45. </div>
  46.  
  47. <div class="container">
  48.  
  49. <div class="row">
  50. <div class="col-lg-8 col-md-8">
  51.  
  52. <div class="post">
  53. <form action="aksi_tambah_diskusi.php" class="form newtopic" method="post">
  54. <div class="postinfotop">
  55. <h2>Tambah Diskusi</h2>
  56. </div>
  57.  
  58. <!-- acc section -->
  59. <div class="accsection">
  60. <div class="acccap">
  61. <div class="userinfo pull-left">&nbsp;</div>
  62. <div class="clearfix"></div>
  63. </div>
  64. <div class="topwrap">
  65. <div class="userinfo pull-left"> </div>
  66. <div class="posttext pull-left">
  67.  
  68. <div class="row">
  69. <div class="col-lg-4 col-md-6">
  70. Topik
  71. </div>
  72.  
  73. <div class="col-lg-8 col-md-6">
  74. <select name="topik" id="topik" class="form-control" >
  75. <option value="" disabled selected>Pilih Topik</option>
  76. <?php
  77. $kueri_comt = mysql_query("select * from topik");
  78. while($comt = mysql_fetch_array($kueri_comt)){
  79. ?>
  80. <option value="<?php echo $comt[id_topik] ?>"><?php echo $comt[judul_topik] ?></option>
  81. <?php }?>
  82. </select>
  83. </div>
  84. </div>
  85.  
  86. <div class="row">
  87. <div class="col-lg-4 col-md-6">
  88. Kategori
  89. </div>
  90.  
  91. <div class="col-lg-8 col-md-6">
  92. <select name="kategori" id="kategori" class="form-control" >
  93. <option value="" disabled selected>Pilih Kategori</option>
  94. <?php
  95. $kueri_comk = mysql_query("select * from kategori");
  96. while($comk = mysql_fetch_array($kueri_comk)){
  97. ?>
  98. <option value="<?php echo $comk[id_kategori] ?>"><?php echo $comk[nama_kategori] ?></option>
  99. <?php }?>
  100. </select>
  101. </div>
  102. </div>
  103.  
  104. <div class="row">
  105. <div class="col-lg-4 col-md-6">
  106. Judul Diskusi
  107. </div>
  108. <div class="col-lg-8 col-md-6">
  109. <input type="text" name="judul" placeholder="judul_diskusi" class="form-control" />
  110. </div>
  111. </div>
  112.  
  113. <div class="row">
  114. <div class="col-lg-4 col-md-6">
  115. Isi Diskusi
  116. </div>
  117. <div class="col-lg-8 col-md-6">
  118. <textarea type="text" placeholder="Isi Diskusi" class="form-control" id="textarea" name="isi" /></textarea>
  119. </div>
  120. </div>
  121.  
  122.  
  123. </div>
  124. <div class="clearfix"></div>
  125. </div>
  126. </div><!-- acc section END -->
  127. <div class="postinfobot">
  128.  
  129. <div class="notechbox pull-left">
  130. </div>
  131.  
  132. <div class="pull-left lblfch">
  133. </div>
  134.  
  135. <div class="pull-right postreply">
  136. <div class="pull-left"><button type="submit" class="btn btn-primary">Simpan</button></div>
  137. <div class="clearfix"></div>
  138. </div>
  139. <div class="clearfix"></div>
  140. </div>
  141. </form>
  142. </div>
  143.  
  144.  
  145. </div>
  146. <div class="col-lg-4 col-md-4">
  147. <?php include 'sidebar.php' ?>
  148.  
  149.  
  150.  
  151.  
  152. </div>
  153. </div>
  154. </div>
  155.  
  156.  
  157. </section>
  158.  
  159. <?php include 'footer.php' ?>
  160. </div>
  161.  
  162. <!-- get jQuery from the google apis -->
  163. <script type="text/javascript" src="js/jquery.js"></script>
  164.  
  165.  
  166. <!-- SLIDER REVOLUTION 4.x SCRIPTS -->
  167. <script type="text/javascript" src="rs-plugin/js/jquery.themepunch.plugins.min.js"></script>
  168. <script type="text/javascript" src="rs-plugin/js/jquery.themepunch.revolution.min.js"></script>
  169.  
  170. <script src="js/bootstrap.min.js"></script>
  171.  
  172.  
  173. <!-- LOOK THE DOCUMENTATION FOR MORE INFORMATIONS -->
  174. <script type="text/javascript">
  175.  
  176. var revapi;
  177.  
  178. jQuery(document).ready(function() {
  179. "use strict";
  180. revapi = jQuery('.tp-banner').revolution(
  181. {
  182. delay: 15000,
  183. startwidth: 1200,
  184. startheight: 278,
  185. hideThumbs: 10,
  186. fullWidth: "on"
  187. });
  188.  
  189. }); //ready
  190.  
  191. </script>
  192.  
  193. <!-- END REVOLUTION SLIDER -->
  194. </body>
  195.  
  196.  
  197. </html>
14900
Please login to answer!
/sangkep/answer/add-json/nogzip/1
/sangkep/answer/send-notification
User Paling Aktif Bulan Lalu

Asrianor

Point Bulan Lalu: 6