Tampilan Input:
Tampilan output :
Berikut ini adalah script inputnya :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style3 {
font-weight: bold;
font-family: "Bodoni MT";
font-size: 24px;
}
-->
</style>
</head>
<body>
<form id="form1" name="form1" method="post" action="catoutput.php">
<p class="style3">TOKO CAT GUNA BANGUN JAYA</p>
<table width="370" border="0">
<tr>
<td width="120">Nama Custumer </td>
<td width="3">:</td>
<td width="225"><input name="nama" type="text" id="nama" /></td>
</tr>
<tr>
<td>Alamat</td>
<td>:</td>
<td><input name="alamat" type="text" id="alamat" /></td>
</tr>
<tr>
<td>Jenis Cat </td>
<td>:</td>
<td><select name="jnscat" id="jnscat">
<option>MOWILEX</option>
<option>DANAPAINT</option>
<option>CATYLAC</option>
</select>
</td>
</tr>
<tr>
<td>Warna Cat </td>
<td>:</td>
<td><input name="wrnacat" type="radio" value="Merah" />
Merah
<input name="wrnacat" type="radio" value="Biru" />
Biru
<input name="wrnacat" type="radio" value="Kuning" />
Kuning</td>
</tr>
<tr>
<td>Jumlah Beli </td>
<td>:</td>
<td><input name="jumbel" type="text" id="jumbel" /></td>
</tr>
<tr>
<td colspan="3"><input type="submit" name="Submit" value="Hitung" />
<input type="reset" name="Submit2" value="Batal" /></td>
</tr>
</table>
<p> </p>
</form>
</body>
</html>
Script outputnya :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style1 {font-family: "Arial Black"}
.style2 {
font-size: 18px;
font-weight: bold;
}
-->
</style>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<p class="style1">
<?php
$nama=$_POST['nama'];
$alamat=$_POST['alamat'];
$jnscat=$_POST['jnscat'];
$jumbel=$_POST['jumbel'];
$wrnacat=$_POST['wrnacat'];
if($jnscat=="CATYLAC")
{$a=40000;}
else if ($jnscat=="DANAPAINT")
{$a=30000;}
else if ($jnscat=="MOWILEX")
{$a=20000;}
$total=$a*$jumbel;
if ($jumbel>=5)
{$b=$total* 5/100;}
else if ($jumbel>=10)
{$b=$total* 10/100;}
else {$b=0;}
$totbay=$total-$b;
?>
</p>
<p class="style1 style2">TOKO CAT GUNA BANGUN JAYA </p>
<table width="500" border="0">
<tr>
<td colspan="4">------------------------------------------------------------------------------</td>
</tr>
<tr>
<td width="151">Nama Costumer </td>
<td width="8">:</td>
<td colspan="2"><?php echo $nama ?> </td>
</tr>
<tr>
<td>Alamat</td>
<td>:</td>
<td colspan="2"><?php echo $alamat ?> </td>
</tr>
<tr>
<td>Jenis Cat </td>
<td>:</td>
<td colspan="2"><?php echo $jnscat ?> </td>
</tr>
<tr>
<td>Warna</td>
<td>:</td>
<td colspan="2"><?php echo $wrnacat ?> </td>
</tr>
<tr>
<td>Harga</td>
<td>:</td>
<td width="129"> </td>
<td width="194">Rp.<?php echo $a ?></td>
</tr>
<tr>
<td>Jumlah Beli </td>
<td>:</td>
<td colspan="2"><?php echo $jumbel ?> </td>
</tr>
<tr>
<td colspan="4">------------------------------------------------------------------------------(*)</td>
</tr>
<tr>
<td>Total Harga </td>
<td>:</td>
<td> </td>
<td>Rp.<?php echo $total ?> </td>
</tr>
<tr>
<td>Diskon</td>
<td>:</td>
<td> </td>
<td>Rp.<?php echo $b ?> </td>
</tr>
<tr>
<td colspan="4">------------------------------------------------------------------------------(-)</td>
</tr>
<tr>
<td>Total Bayar </td>
<td>:</td>
<td> </td>
<td>Rp.<?php echo $totbay ?> </td>
</tr>
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td colspan="4">------------------------------------------------------------------------------</td>
</tr>
<tr>
<td colspan="4"><a href="cat.php">Kembali</a></td>
</tr>
</table>
<p class="style1"> </p>
</form>
</body>
</html>
Abdillah Blogspot
Rabu, 02 November 2016
Jumat, 21 Oktober 2016
Tugas Web Programming 2
Tugas WebProgramming 2
Berikut script tampilan inputnya dan penjelasannya
script tampilan input
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style1 {
font-size: 24px;
font-weight: bold;
}
.style2 {
font-size: 14px;
font-weight: bold;
}
.style3 {font-size: 14px}
-->
</style>
</head>
<body>
<form id="form1" name="form1" method="post" action="konohaoutput.php">
<p class="style1">Formulir Pegawai Negeri Konoha</p>
<table width="373" border="1"> ---------------------------------"mengatur ketebalan tabel"
<tr>
<td colspan="2"><strong>Isi Data Dibawah Ini : </strong></td>
</tr>
<tr>
<td width="171"><strong>Nama</strong></td>
<td width="145"><input name="nama" type="text" id="nama" /></td>
</tr>
<tr>
<td><strong>Alamat</strong></td>
<td><textarea name="alamat" id="alamat"></textarea></td>
</tr>
<tr>
<td><strong>Tempat Lahir </strong></td>
<td><input name="tmptlahir" type="text" id="tmptlahir" /></td>
</tr>
<tr>
<td><strong>Tanggal Lahir </strong></td>
<td><input name="tgllahir" type="text" id="tgllahir" /></td>
</tr>
<tr>
<td><strong>Jenis Kelamin </strong></td>
<td><strong>
<input name="jeniskelamin" type="radio" value="laki-laki" />
<span class="style3"> Laki-Laki</span> </strong>
<span class="style2">
<input name="jeniskelamin" type="radio" value="perempuan" />
Perempuan</span></td>
</tr>
<tr>
<td><strong>Pendidikan</strong></td>
<td><select name="pendidikan" id="pendidikan">
<option>SMA</option>
<option>D3</option>
<option>S1</option>
<option>S3</option>
</select>
</td>
</tr>
<tr>
<td colspan="2">
<div align="center">
<input type="submit" name="Submit" value="Submit" />
<input type="reset" name="Submit2" value="Cancel" />
</div></td>
</tr>
</table>
<p class="style1"> </p>
</form>
</body>
</html>
Contoh tampilan outputnya dan scriptnya
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<p>FORMULIR PEGAWAI NEGERI KONOHA</p>
<?php
$nama=$_POST['nama'];
$alamat=$_POST['alamat'];
$tmptlahir=$_POST['tmptlahir'];
$tgllahir=$_POST['tgllahir'];
$jeniskelamin=$_POST['jeniskelamin'];
$pendidikan=$_POST['pendidikan'];
?>
<table width="358" border="1">
<tr>
<td width="170">Nama</td>
<td width="162"><?php echo $nama ?> </td>
</tr>
<tr>
<td>Alamat</td>
<td><?php echo $alamat ?> </td>
</tr>
<tr>
<td>Tempat Lahir </td>
<td><?php echo $tmptlahir ?> </td>
</tr>
<tr>
<td>Tanggal Lahir </td>
<td><?php echo $tgllahir ?> </td>
</tr>
<tr>
<td>Jenis Kelamin </td>
<td><?php echo $jeniskelamin ?> </td>
</tr>
<tr>
<td>Pendidikan</td>
<td><?php echo $pendidikan ?> </td>
</tr>
<tr>
<td colspan="2"><a href="konoha.php">Back To Home</a></td>
</tr>
</table>
<p> </p>
</form>
</body>
</html>
Berikut script tampilan inputnya dan penjelasannya
script tampilan input
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style1 {
font-size: 24px;
font-weight: bold;
}
.style2 {
font-size: 14px;
font-weight: bold;
}
.style3 {font-size: 14px}
-->
</style>
</head>
<body>
<form id="form1" name="form1" method="post" action="konohaoutput.php">
<p class="style1">Formulir Pegawai Negeri Konoha</p>
<table width="373" border="1"> ---------------------------------"mengatur ketebalan tabel"
<tr>
<td colspan="2"><strong>Isi Data Dibawah Ini : </strong></td>
</tr>
<tr>
<td width="171"><strong>Nama</strong></td>
<td width="145"><input name="nama" type="text" id="nama" /></td>
</tr>
<tr>
<td><strong>Alamat</strong></td>
<td><textarea name="alamat" id="alamat"></textarea></td>
</tr>
<tr>
<td><strong>Tempat Lahir </strong></td>
<td><input name="tmptlahir" type="text" id="tmptlahir" /></td>
</tr>
<tr>
<td><strong>Tanggal Lahir </strong></td>
<td><input name="tgllahir" type="text" id="tgllahir" /></td>
</tr>
<tr>
<td><strong>Jenis Kelamin </strong></td>
<td><strong>
<input name="jeniskelamin" type="radio" value="laki-laki" />
<span class="style3"> Laki-Laki</span> </strong>
<span class="style2">
<input name="jeniskelamin" type="radio" value="perempuan" />
Perempuan</span></td>
</tr>
<tr>
<td><strong>Pendidikan</strong></td>
<td><select name="pendidikan" id="pendidikan">
<option>SMA</option>
<option>D3</option>
<option>S1</option>
<option>S3</option>
</select>
</td>
</tr>
<tr>
<td colspan="2">
<div align="center">
<input type="submit" name="Submit" value="Submit" />
<input type="reset" name="Submit2" value="Cancel" />
</div></td>
</tr>
</table>
<p class="style1"> </p>
</form>
</body>
</html>
Contoh tampilan outputnya dan scriptnya
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<p>FORMULIR PEGAWAI NEGERI KONOHA</p>
<?php
$nama=$_POST['nama'];
$alamat=$_POST['alamat'];
$tmptlahir=$_POST['tmptlahir'];
$tgllahir=$_POST['tgllahir'];
$jeniskelamin=$_POST['jeniskelamin'];
$pendidikan=$_POST['pendidikan'];
?>
<table width="358" border="1">
<tr>
<td width="170">Nama</td>
<td width="162"><?php echo $nama ?> </td>
</tr>
<tr>
<td>Alamat</td>
<td><?php echo $alamat ?> </td>
</tr>
<tr>
<td>Tempat Lahir </td>
<td><?php echo $tmptlahir ?> </td>
</tr>
<tr>
<td>Tanggal Lahir </td>
<td><?php echo $tgllahir ?> </td>
</tr>
<tr>
<td>Jenis Kelamin </td>
<td><?php echo $jeniskelamin ?> </td>
</tr>
<tr>
<td>Pendidikan</td>
<td><?php echo $pendidikan ?> </td>
</tr>
<tr>
<td colspan="2"><a href="konoha.php">Back To Home</a></td>
</tr>
</table>
<p> </p>
</form>
</body>
</html>
Jumat, 30 September 2016
tugas script web program 1
TUGAS WEB PROGRAMMING 1.
BERIKUT INI SCRIPT DAN PENJELASANNYA :
------------------------------------------------------------------
<html>
<head>
<title>tugas wp1</title>
</head>
<font color=white> ---->mewarnai header text
<h1>D A T A M A H A S I SW A</h1>
<table border=1 > ---->untuk menetukan ketebalan garis tabel
<body text=black bgcolor=blue> ---->untuk mewarnai text data dan back ground
<table width="500" border="1" bgcolor=red> ---->menetukan kelebaran,ketebalan dan warna tabel
<tr>
<td>
Nim
</td>
<td>
:
</td>
<td>
12101234
</td></tr>
<tr>
<td>
Nama
</td>
<td>
:
</td>
<td>
Luthfi Alamsyah
</td></tr>
<tr>
<td>
Kelas
</td>
<td>
:
</td>
<td>
12.5a.25
</td></tr>
<tr>
<td>
Jurusan
</td>
<td>
:
</td>
<td>
Manajemen Informatika
</td></tr>
<TR>
<td>
Alamat
</td>
<td>
:
</td>
<td>
</td></tr>
<tr>
<td>
No.Telepon
</td>
<td>
:
</td>
<td>
085770557748
</td></tr>
</table>
</body>
</html>
------------------------------------------------------------------
Langganan:
Postingan (Atom)