Pemrograman PHP 4

Form WEB

 

 

Latihan 01 <<< input_segitiga.php >>

<!doctype html public “-//W3C//DTD HTML 4.0 //EN”>

<html>

<head>

<title>Menghitung Luas Segitiga</title>

</head>

<body>

<form action = “output_segitiga.php” method = “get”>

<font face = “courier new” size = 3>

<h1>***** MENGHITUNG LUAS SEGITIGA *****</h1><p>

<hr width = 500 color = blue align = left>

<pre>

Masukkan ALAS   = <input type = “text” name = “alas” size = 10 maxlength = 10><br>

Masukkan TINGGI = <input type = “text” name = “tinggi” size = 10 maxlength = 10><br>

</pre>

<hr width = 500 color = blue align = left>

</font>

<input type=”submit” name = “hitung” value = “HITUNG LUAS”>

&nbsp;&nbsp;&nbsp;&nbsp;

<input type=”reset” name = “batal” value = “BERSIH”>

</form>

</body>

</html>

 

 

Latihan 02 <<< output_segitiga.php >>

<!doctype html public “-//W3C//DTD HTML 4.0 //EN”>

<html>

<head>

<title>Menghitung Luas Segitiga</title>

</head>

<body>

<font face = “courier new” size = 3>

<h1>***** HASIL PERHITUNGAN *****</h1><p>

<hr width = 500 color = blue align = left>

<?

$alas = $_GET[‘alas’];

$tinggi = $_GET[‘tinggi’];

print(“<pre>”);

print(“ALAS   = $alas <br>”);

print(“TINGGI = $tinggi <br>”);

$luas = ($alas * $tinggi)/2;

echo”LUAS   = ( alas * tinggi )/2 <br>”;

echo”       = ( $alas * $tinggi )/2 <br>”;

echo”       = $luas”;

?>

<hr width = 500 color = blue align = left><p>

<a href = “input_segitiga.php”>LAGI <<<</a>

</font>

</body>

</html>

 

Latihan 01 <<< input_lingkaran.php >>>

<!doctype html public “-//W3C//DTD HTML 4.0 //EN”>

<html>

<head>

<title>Menghitung Luas Lingkaran</title>

</head>

<body>

<form action = “output_lingkaran.php” method = “post”>

<font face = “courier new” size = 3>

<h1>***** MENGHITUNG LUAS SEGITIGA *****</h1><p>

<hr width = 500 color = yellow align = left>

<p>

Masukkan Jari-Jari Lingkaran   =

<input type = “text” name = “jari2″ size = 10 maxlength = 10>

<p>

<hr width = 500 color = yellow align = left>

</font>

<input type=”submit” name = “hitung” value = “HITUNG LUAS”>

&nbsp;&nbsp;&nbsp;&nbsp;

<input type=”reset” name = “batal” value = “BERSIH”>

</form>

</body></html>

 

 

Latihan 02 <<< output_lingkaran.php >>>

<!doctype html public “-//W3C//DTD HTML 4.0 //EN”>

<html>

<head>

<title>Menghitung Luas Segitiga</title>

</head>

<body>

<font face = “courier new” size = 3>

<h1>***** HASIL PERHITUNGAN *****</h1><p>

<hr width = 500 color = yellow align = left>

<?

$jari2 = $_POST[‘jari2’];

define(“phi”,3.14);

echo”<pre>”;

echo”JARI_JARI LINGKARAN = $jari2 <br>”;

printf(“PHI              = %0.2f <br>”,phi);

$luas = phi * ($jari2 * $jari2);

printf(“LUAS         = %0.2f * r<sup>2</sup> <br>”,phi);

printf(”             = %0.2f * ( $jari2 * $jari2 ) <br>”,phi);

echo”                      = $luas”;

?>

<hr width = 500 color = yellow align = left><p>

<a href = “input_lingkaran.php”>LAGI <<<</a>

</font>

</body>

</html>

 

Latihan 01 <<< halamansatu.php >>>

<!doctype html public “-//W3C//DTD HTML 4.0 //EN”>

<html>

<head>

<title>WEB-SITE PERTAMAKU</title>

</head>

<body text = #000000 bgcolor = #C0C0C0>

<font face = “courier new” size = 4>

<center>

<img src = “banner.jpg” width = 1000 height = 150>

</center>

<p>

<hr color = blue>

<ul type = square>

<li> <a href = “halamandua.php”> Isi Buku Tamu </a>

<p>

<li> <a href = “biodata.php”> Biodata Saya </a>

</ul>

<p>

<hr color = blue>

<marquee>

<i> ***** Terima Kasih Telah Mengunjungi Web Pertama-Ku ***** </i>

</marquee>

</font>

</body>

</html>

 

 

 

 

Latihan 02 <<< halamandua.php >>>

<!doctype html public “-//W3C//DTD HTML 4.0 //EN”>

<html>

<head>

<title>WEB-SITE PERTAMAKU</title>

</head>

<body text = #000000 bgcolor = #C0C0C0>

<font face = “courier new” size = 4>

<center>

<img src = “banner.jpg” width = 1000 height = 150>

</center>

<p>

<hr color = blue>

<p>

<form action = “halamantiga.php” method = “get”>

<table align = center border = 0 width = 700>

<tr>

<td colspan = 3><center>BUKU TAMU WEBSITE-KU</center></td>

</tr>

<tr><td colspan = 3><hr color = black></td></tr>

<tr>

<td> Nama Lengkap </td> <td> : </td>

<td><input type=”text” name = “nama” size = 25 maxlength = 30></td>

</tr>

<tr>

<td> Email </td> <td> : </td>

<td><input type=”text” name = “email” size = 35 maxlength = 40></td>

</tr>

<tr>

<td> Kritik & Saran</td> <td> : </td>

<td><textarea name = “komentar” rows=5 cols=50 wrap=”off”></textarea></td>

</tr>

<tr><td colspan = 3><hr color = black></td></tr>

</table>

<center>

<input type=”submit” name = “lanjut” value = “Kirim”>

&nbsp;

<input type=”reset” name = “batal” value = “Batal”>

</center>

</form>

<p>

<hr color = blue>

<ul type = square>

<li> <a href = “halamansatu.php”> Halaman Utama </a>

<p>

<li> <a href = “biodata.php”> Biodata Saya </a>

</ul>

<p>

<hr color = blue>

<marquee>

<i> ***** Silahkan Isi Buku Tamu ***** </i>

</marquee>

</font>

</body>

</html>

 

Latihan 03 <<< halamantiga.php >>>

<!doctype html public “-//W3C//DTD HTML 4.0 //EN”>

<html>

<head>

<title>WEB-SITE PERTAMAKU</title>

</head>

<body text = #000000 bgcolor = #C0C0C0>

<font face = “courier new” size = 4>

<center>

<img src = “banner.jpg” width = 1000 height = 150>

<p>

<hr color = blue>

***** TERIMA KASIH TELAH MENGISI BUKU TAMU **** <br>

<i> Komentar dan Saran Anda Sudah Terkirim </i>

<p>

<hr color = blue>

</center>

<?

$nama = $_GET[‘nama’];

$email = $_GET[’email’];

$komentar = $_GET[‘komentar’];

echo “<pre>”;

echo ”

Terima Kasih Sdr/Sdri $nama

Alamat Email Anda $email

Kritik & Saran Anda mengenai web ini : $komentar

“;

echo “</pre>”;

?>

<hr color = blue>

<ul type = square>

<li> <a href = “halamansatu.php”> Halaman Utama </a>

<p>

<li> <a href = “biodata.php”> Biodata Saya </a>

</ul>

<hr color = blue>

<marquee>

<i> ***** Terima Kasih Telah Mengisi Buku Tamu ***** </i>

</marquee>

</font>

</body>

</html>

 

Latihan 04 <<< biodata.php >>>

<!doctype html public “-//W3C//DTD HTML 4.0 //EN”>

<html>

<head>

<title>WEB-SITE PERTAMAKU</title>

</head>

<body text = #000000 bgcolor = #C0C0C0>

 

<center> <img src = “banner.jpg” width = 1000 height = 150> </center>

<p>

<hr color = blue>

<p>

<table align = center border = 1 width = 700 bgcolor = #8080FF>

<tr>

<td colspan = 3><center>BIODATA SAYA</center></td>

</tr>

<tr>

<td> Nama Saya </td> <td> : </td> <td> Muhammad Faiz Azhar </td>

</tr>

<tr>

<td> Alamat </td> <td> : </td> <td> Jl. Merdeka 01 – Bekasi Utara </td>

</tr>

<tr>

<td> Hobi Saya </td> <td> : </td>

<td>

<ul>

<li> Gambar + Baca Komik

<li> Main Game

</ul>

</td>

<tr>

<td colspan = 3>

<center>

<pre>

<a href = “halamansatu.php”> Halaman Utama </a>   <a href = “halamandua.php”> Isi Buku Tamu </a>

</pre>

</center>

</td>

</tr>

</table>

<p>

<hr color = blue>

<marquee>

<i> ***** Terima Kasih Telah Mengunjungi Web Pertama-Ku ***** </i>

</marquee>

</body>

</html>

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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