algoritma saya dapet,tapi bagian itu saya enggak. ya saya kurang iLmu memang mas...ini sambil beLajar... satu pertanyaan mas.... kenapa loopingnya selalu lebih
ini source'y...mohon mas sekali lagi
<?PHP
session_start();
include "../config/koneksi.php";
$tahun= date("Y");
if(empty($_SESSION['namauser']) and empty($_SESSION['passuser'])){
echo"<link href='../config/style.css' rel='stylesheet' type='text/css'>
<center>Untuk mengakses module ini anda harus login<br />
<a href='http://localhost/contoh_krs/index.php?hal=logdoswal'>Login</a></center>";
}else {
$carinim = mysql_query("SELECT * FROM mhs WHERE NIDN='$_SESSION[namauser]' ");
while($hasilnim = mysql_fetch_array($carinim)){
$nim = $hasilnim['NIMHS'];
$result = mysql_query("Select count(kodekuliah) as total from krs1 where NIMHS='$nim' and tahun='$tahun'");
while($hasil = mysql_fetch_array($result)){
echo 'Total:'.$hasil['total'];
$tampilkrs=mysql_query("select * from mhs, jumlah WHERE mhs.NIMHS=jumlah.NIMHS AND mhs.STMHS='AK' and jumlah.tahun='$tahun'");
echo"<h2>Detail KRS Mahasiswa</h2>
<table>";
$jum = 0;
$i = 1;
?>
<table border=1 width=400 style="border-collapse:collapse" bordercolor="#999999">
<tr><td ><b>No</b></td><td><b>NIM</b></td>
<td><b>Nama MHS</b></td>
<td><b>Jumlah MK</b></td>
<td><b>Jml SKS</b></td>
<?
$jum = 0;
$i = 1;
while ($k=mysql_fetch_array($tampilkrs)){
echo "<tr><td>$i</td>";
echo "<td>".$k['NIMHS']."</td>";
echo "<td>".$k['NMMHS']."</td>";
echo "<td align='center'>".$hasil['total']."</td>";
echo "<td align='center'>".$k['JUMSKS']."</td></tr>";
$i++;
}
}
}";
</br>
<span id=jsks></span></td></tr>";
echo"</td></tr></table>";
?>
<table><tr><td><a href="javascript:void window.open('http://localhost/contoh_krs/dosen_wali/cetak_lapdoswal.php?option=com_content&task=view&Itemid=143&pop=1&page=0', 'win2', 'status=no,addressbar=yes,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=800,height=800,directories=yes,location=yes'); "
title='Tampil satu halaman untuk dicetak ke printer'><b>[ CETAK ]</b></td></tr>
<?
echo " </table></br>";
}?>