Pemrograman Web 2. Modul 8. Form Lembar Hasil Studi (LHS) dengan menggunakan PHP

1. Formlhs.html

<h3>Form Lembar Hasil Studi</h3>
<table border=1>
<form method=post action="tampillhs.php">
No BP    </td><td>=<input type=text name="nobp"</td></tr>
Semester </td><td>=<input type=text name="semester"</td></tr>
Tahun    </td><td>=<input type=text name="tahun"</td></tr>
<input type =submit value="OK">
<input type=reset value ="Cancel"></td></tr>

2. Tampillhs.php


$nobp= $_POST['nobp'];
$semester= $_POST['semester'];
$tahun = $_POST['tahun'];

$krssql = mysql_query("select * from krs where nobp='$nobp'
 AND semester='$semester' AND tahun='$tahun'");
if($hasil > 0 )
$mhssql = mysql_query("select * from mhs where nobp='$nobp'");
if ($hasilmhs)
echo"<table border=1>";
echo"<tr><td colspan=7>NOBP : $nobp<br>";
echo"Nama : $hasilmhs[1]<br>";
echo"Semester : $semester<br>";
echo"Tahun : $tahun<br></td></tr>";

<tr>  <th>No.</th>
 <th>Nama Matakuliah</th>
 <th>Bobot Mutu</th>
$sqlkrs = mysql_query("SELECT * FROM krs, mtk WHERE nobp='$nobp'
 AND krs.kodemk = mtk.kode
 AND krs.semester='$semester' AND krs.tahun='$tahun'");
$jumsks = 0;
$i = 1;
while($datakrs = mysql_fetch_array($sqlkrs)){
 echo "<tr><td>$i</td>";
 echo "<td>$datakrs[kode]</td>";
 echo "<td>$datakrs[nama]</td>";
 echo "<td>$datakrs[sks]</td>";
 echo "<td>$datakrs[Nilai]</td>";
 if ($datakrs['Nilai']=="A")
 else if ($datakrs['Nilai']=="B")
 else if ($datakrs['Nilai']=="C")
 else if ($datakrs['Nilai']=="D")
 echo "<td>$mutu</td>";
 $bobotmutu = $datakrs['sks'] * $mutu;
 echo "<td>$bobotmutu</td>";
 $jumsks = $jumsks + $datakrs['sks'];
 $totbot = $totbot + $bobotmutu;
echo "<tr><td colspan=6>JUMLAH SKS</td><td>$jumsks</td></tr>";
echo "<tr><td colspan=6>JUMLAH Bobot</td><td>$totbot</td></tr>";
$ipk = $totbot / $jumsks;
echo "<tr><td colspan=6>IPK</td><td>$ipk</td></tr>";


3.  Tampildosen.php

include "konek.php";
$tampil="select * from dosen";
echo"<table border=1>";
echo"Daftar Dosen";
echo"<tr><th>No. </th>
 <th>Kode Dosen </th>
 <th>Nama Dosen </th>
 <th>Alamat Dosen </th></tr>";
echo "<tr><td>$nomor</td>";
echo "<td>$data[0]</td>";
echo "<td>$data[1]</td>";
echo "<td>$data[2]</td>";


Materi yang berhubungan :

1. Aplikasi Sistem Informasi Akademik
2. Form MAhasiswa
3. Form Dosen
4. Form Matakuliah
5. Jadwal Perkuliahan"
6. Form KRS
7. Form Nilai
8. Form LHS

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: