Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'index.php';
- $dbhost='localhost';
- $dbuser='root';
- $dbpass='';
- $dbname='spktopsispemilihansekolah';
- $db=new mysqli($dbhost,$dbuser,$dbpass,$dbname);
- $sql = "SELECT
- a.id_sekolah, b.id_fasilitas, c.id_ekstra
- FROM
- sekolah a, fasilitas b, ekstrakulikuler c
- WHERE
- a.id_sekolah = b.id_fasilitas
- AND
- a.id_sekolah = c.id_ekstra"
- ;
- ?>
- <!--main content start-->
- <section id="main-content">
- <section class="wrapper">
- <!--overview start-->
- <div class="row">
- <div class="col-lg-12">
- <h3 class="page-header"><i class="fa fa-laptop"></i>Detail Sekolah</h3>
- <!--tab nav start-->
- <section class="panel">
- <div class="panel-body">
- <div class="thumbnail">
- <div id="data" class="tab-pane active">
- <h4>Detail Sekolah</h4>
- <table class="table table-bordered table-responsive">
- <thead>
- <tr>
- <th>NPSN</th>
- <th>Nama Sekolah</th>
- <th>Akreditasi</th>
- <th>Kepala Sekolah</th>
- <th>Alamat</th>
- <th>No. Telp</th>
- <th>Email</th>
- <th>Website</th>
- <th>Biaya SPP</th>
- </tr>
- </thead>
- <tbody>
- <?php
- $conn = mysqli_connect("localhost","root","","spktopsispemilihansekolah");
- $id_sekolah=$_GET['id_sekolah'];
- $altr = "SELECT * from sekolah where id_sekolah='$id_sekolah'";
- $tampil=mysqli_query($conn,$altr);
- while ($hasil=mysqli_fetch_array($tampil)) {
- echo "<tr>
- <td>$hasil[npsn]</td>
- <td>$hasil[nama_sekolah]</td>
- <td>$hasil[akreditasi]</td>
- <td>$hasil[kepsek]</td>
- <td>$hasil[alamat]</td>
- <td>$hasil[telp]</td>
- <td>$hasil[email]</td>
- <td>$hasil[web]</td>
- <td>$hasil[spp]</td>
- </tr>";
- }
- ?>
- </tbody>
- </table>
- <div class="thumbnail">
- <div id="data" class="tab-pane active">
- <h4>Detail Fasilitas</h4>
- <table class="table table-bordered table-responsive">
- <thead>
- <tr>
- <th>Nama Fasilitas</th>
- </tr>
- </thead>
- <tbody>
- <?php
- $conn = mysqli_connect("localhost","root","","spktopsispemilihansekolah");
- $krtr = "select * from fasilitas_sekolah where id_fasilitas = '$id_fasilitas'";
- $hasil = mysqli_query($conn, $krtr);
- while($data=mysqli_fetch_array($hasil)){
- echo "<tr>
- <td>$hasil[nama_fasilitas]</td>
- </tr>";
- }
- ?>
- </tbody>
- </table>
- <div class="thumbnail">
- <div id="data" class="tab-pane active">
- <h4>Detail Ekstrakulikuler</h4>
- <table class="table table-bordered table-responsive">
- <thead>
- <tr>
- <th>Nama Ekstrakulikuler</th>
- </tr>
- </thead>
- <tbody>
- <?php
- $conn = mysqli_connect("localhost","root","","spktopsispemilihansekolah");
- $krtr = "select * from sekolah_ekstra where id_ekstra = '$id_ekstra'";
- $hasil = mysqli_query($conn, $krtr);
- while($data=mysqli_fetch_array($hasil)){
- echo "<tr>
- <td>$hasil[nama_fasilitas]</td>
- </tr>";
- }
- ?>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </section>
- <!--tab nav start-->
- </div>
- </div>
- </section>
- </section>
- <!--main content end-->
- <?php
- include 'footer.php';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement