switch($mk)
{
case "Borland":
$biaya=100000;
$pert=10;
break;
case "Visual Basic":
$biaya=200000;
$pert=20;
break;
default:
$biaya=300000;
$pert=30;
break;
}
{
if (strcmp($tp,"Khusus(10siswa)")==0)
$adm=100000;
if (strcmp($tp,"Khusus(30siswa)")==0)
$adm=200000;
if (strcmp($tp,"Khusus(50siswa)")==0)
$adm=300000;
}
$bdx=0;
$bdy=0;
$bdz=0;
if($x){$bdx=50000;}
if($y){$bdx=100000;}
if($z){$bdx=200000;}
$tbd=$bdx+$bdy+$bdz;
$t=$tbd+$biaya+$adm;
echo"DAFTAR PENDAFTAR
";
echo"Tanggal Daftar :";
echo(Date("d/D-F-Y"));
echo"
";
echo"No Pendaftar :$no
";
echo"Nama Pendaftar : $nm
";
echo"Materi Kelas : $mk
";
echo"Biaya :RP.$biaya
";
echo"Pertemuan :$pert x
";
echo"Type kelas :$tp
";
echo"Administrasi :Rp.$adm
";
echo"Biaya Dosen :Rp.$tbd
";
echo"Total biaya :Rp.$t
";
echo"
";
echo(date("H:I:S"));
echo"
";
?>
112
belajar php " kelas komputer"
Coding Input
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>INPUT UTS</title>
</head>
<body bgcolor=black>
<form method=get action=okursus.php>
<font size=4 color=black;
<table border=4 width=10%bg color=black callspasing=5 cellpadding=25
align=center>
<pre>
<tr><td colspan="10"><strong><div align="center">
<blink><font size=6 color=red>Kelas Komputer</font></blink></div></strong></tr></td>
<tr>
<td>
No.Pendaftar : <td><input type="number" name=no size=5></td></tr>
<tr>
<td>
Nama Pendaftar : <td><input type="text" name=nm size=25></td></tr>
<tr>
<td>
Materi Kelas : <td><select name=mk><option>Borland</option>
<option>Vissual Basic</option>
<option>Web Programing</option> </tr></td>
<tr>
<td>
Type Kelas : <td><input type="radio" name=tp value=khusus (10siswa)><font color=black>khusus(10siswa)</font>
<input type="radio" name=tp value=khusus (20siswa)><font color=black>khusus(20siswa)</font>
<input type="radio" name=tp value=khusus (30siswa)><font color=black>khusus(30siswa)</font></tr></td>
<tr>
<td>
Pilih Dosen : <td><input type="checkbox" name=x>burhan S.com <br>
<input type="checkbox" value=y> Somad Spd <br>
<input type="checkbox" value=z> Rizky.MM </tr></td>
<tr><td colspan="6">
<div align="center"><input type="submit"name=Proses value=Proses>
<input type="reset"name=reset value=Batal></div>
</tr>
</td>
</form>
</pre>
</body>
</html>
Coding Output
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>OUTPUT UTS</title>
</head>
<body bgcolor=black>
<font size=4 color=#DFE925>
<pre>
<?
switch($mk)
{
case "Borland":
$biaya=100000;
$pert=10;
break;
case "Visual Basic":
$biaya=200000;
$pert=20;
break;
default:
$biaya=300000;
$pert=30;
break;
}
{
if (strcmp($tp,"Khusus(10siswa)")==0)
$adm=100000;
if (strcmp($tp,"Khusus(30siswa)")==0)
$adm=200000;
if (strcmp($tp,"Khusus(50siswa)")==0)
$adm=300000;
}
$bdx=0;
$bdy=0;
$bdz=0;
if($x){$bdx=50000;}
if($y){$bdx=100000;}
if($z){$bdx=200000;}
$tbd=$bdx+$bdy+$bdz;
$t=$tbd+$biaya+$adm;
echo"<font color=#00FF00><strong>DAFTAR PENDAFTAR</strong></font><br>";
echo"Tanggal Daftar :";
echo(Date("d/D-F-Y"));
echo"<br>";
echo"No Pendaftar :$no <br>";
echo"Nama Pendaftar : $nm <br>";
echo"Materi Kelas : $mk<br>";
echo"Biaya :RP.$biaya<br>";
echo"Pertemuan :$pert x<br>";
echo"Type kelas :$tp <br>";
echo"Administrasi :Rp.$adm<br>";
echo"Biaya Dosen :Rp.$tbd<br>";
echo"Total biaya :Rp.$t<br>";
echo"<br>";
echo(date("H:I:S"));
echo"<br>";
?>
</pre>
</body>
</html>
Subscribe to:
Posts (Atom)