我是第一个使用bootsrapt,我想显示3个包含内容的标签,我的第一个标签正在工作,但我的第二个标签和第三个标签也不起作用,尽管tabel的ID不同。我的标签ID也有不同的名称。这是我的代码,我的问题是我的代码中的问题,我想显示3个标签。
<div class="panel panel-default tabs">
<ul class="nav nav-tabs" role="tablist">
<li class="active"><a href="#tab-first" role="tab" data-toggle="tab">Universitas</a></li>
<li><a href="#tab-second" role="tab" data-toggle="tab">Fakultas</a></li>
<li><a href="#tab-third" role="tab" data-toggle="tab">Prodi</a></li>
</ul>
<div class="panel-body tab-content">
<div class="tab-pane active" id="tab-first">
<div class="box-body table-responsive">
<table id="universitas" class="table table-bordered table-striped">
<thead>
<tr>
<th>No</th>
<th>Tahun Akademik</th>
<th>Pro Kehadiran Mahasiswa</th>
<th>Pro Kehadiran Dosen</th>
<th>Rata - Rata IPK</th>
<th>Nilai A</th>
<th>Nilai B</th>
<th>Nilai C</th>
<th>Nilai D</th>
<th>Nilai E</th>
</tr>
</thead>
<?php
$no = 1;
$sql_ipk = mysql_query("SELECT proMhs, proDsn, avgIpk, Nilai_A, Nilai_B, Nilai_C, Nilai_D, Nilai_E FROM v_akademik WHERE TAHUN>='$tahun_awal' and TAHUN <= '$tahun_akhir' group by TAHUN");
$tahun_end = $tahun_awal+1;
while( $data = mysql_fetch_array( $sql_ipk) ){
echo "
<tr>
<td>$no</td>
<td>$tahun_awal - $tahun_end</td>
<td>$data[proMhs] %</td>
<td>$data[proDsn] %</td>
<td>$data[avgIpk]</td>
<td>$data[Nilai_A] %</td>
<td>$data[Nilai_B] %</td>
<td>$data[Nilai_C] %</td>
<td>$data[Nilai_D] %</td>
<td>$data[Nilai_E] %</td>
</tr>";
$no++;
$tahun_awal++;
$tahun_end++;
}
?>
</tbody>
</table>
</div>
</div>
<div class="tab-pane" id="tab-second">
<div class="box-body table-responsive">
<table id="universitas2" class="table table-bordered table-striped" >
<thead>
<tr>
<th>No</th>
<th>Tahun Akademik</th>
<th>Pro Kehadiran Mahasiswa</th>
<th>Pro Kehadiran Dosen</th>
<th>Rata - Rata IPK</th>
<th>Nilai A</th>
<th>Nilai B</th>
<th>Nilai C</th>
<th>Nilai D</th>
<th>Nilai E</th>
</tr>
</thead>
<tbody>
<?php
$no = 1;
$sql_ipk = mysql_query("SELECT proMhs, proDsn, avgIpk, Nilai_A, Nilai_B, Nilai_C, Nilai_D, Nilai_E FROM v_akademik WHERE TAHUN>='$tahun_awal' and TAHUN <= '$tahun_akhir' group by TAHUN, NM_FAKULTAS");
$tahun_end = $tahun_awal+1;
while( $data2 = mysql_fetch_array( $sql_ipk) ){
echo "
<tr>
<td>$no</td>
<td>$tahun_awal - $tahun_end</td>
<td>$data2[proMhs] %</td>
<td>$data2[proDsn] %</td>
<td>$data2[avgIpk]</td>
<td>$data2[Nilai_A] %</td>
<td>$data2[Nilai_B] %</td>
<td>$data2[Nilai_C] %</td>
<td>$data2[Nilai_D] %</td>
<td>$data2[Nilai_E] %</td>
</tr>";
$no++;
$tahun_awal++;
}
?>
</tbody>
</table>
</div>
</div>
<div class="tab-pane" id="tab-third">
<div class="box-body table-responsive">
<table id="universitas" class="table table-bordered table-striped" >
<thead>
<tr>
<th>No</th>
<th>Tahun Akademik</th>
<th>Pro Kehadiran Mahasiswa</th>
<th>Pro Kehadiran Dosen</th>
<th>Rata - Rata IPK</th>
<th>Nilai A</th>
<th>Nilai B</th>
<th>Nilai C</th>
<th>Nilai D</th>
<th>Nilai E</th>
</tr>
</thead>
<tbody>
<?php
$no = 1;
$sql_ipk = mysql_query("SELECT proMhs, proDsn, avgIpk, Nilai_A, Nilai_B, Nilai_C, Nilai_D, Nilai_E FROM v_akademik WHERE TAHUN>='$tahun_awal' and TAHUN <= '$tahun_akhir' group by TAHUN, NM_FAKULTAS, NM_PRODI");
$tahun_end = $tahun_awal+1;
while( $data = mysql_fetch_array( $sql_ipk) ){
echo "
<tr>
<td>$no</td>
<td>$tahun_awal - $tahun_end</td>
<td>$data[proMhs] %</td>
<td>$data[proDsn] %</td>
<td>$data[avgIpk]</td>
<td>$data[Nilai_A] %</td>
<td>$data[Nilai_B] %</td>
<td>$data[Nilai_C] %</td>
<td>$data[Nilai_D] %</td>
<td>$data[Nilai_E] %</td>
</tr>";
$no++;
$tahun_awal++;
$tahun_end++;
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>