Tutorial PHP 5
1. Bukalah Dreamweaver anda lalu New dan buat project baru.
2. Copas script dibawah ini ke project baru anda, dan save as lalu beri nama "modul_header"
<!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=utf-8" />
<title>Modul Header</title>
</head>
<body>
<center>
============================================================
<br />
<strong>SMK TELKOM SANDHY PUTRA MALANG</strong>
<br />
============================================================
<br />
<?php
$kalimat="Orang sukses selalu !!";
function tulistebal ($text) {
echo "<b>$text</b>";
}
?>
</body>
</html>
3. crate new lagi dan isikan dengan Script dibawah ini, dan save as dengan nama "PHP 2"..
<?php
echo "<font color=brown>Hello cooyy namaku Prasetya Eka Menggala !!</font>";
?>
<!--
Script di bawah ini berguna untuk menampilkan biodata dan untuk menampilkan gambar/foto yang anda inginkan. semoga bermanfaat untuk kita semua
-->
<html>
<body><br>
<?php
echo "<font color=red size=6><center>Biodata</center></font>";
?>
<table border=1>
<tr>
<td><?php echo "<b><font color=orange>Nama Lengkap</font></b>" ?></td>
<td><?php echo "<b><font color=brown>:</font></b>" ?></td>
<td><?php echo "<b><font color=green>Prasetya Eka Menggala</font></b>" ?></td>
<td rowspan="9">
<img src="DSC_5474.JPG" width="150" height="250">
</td>
</tr>
<tr>
<td><?php echo "<b><font color=orange>Nama Panggilan</font></b>" ?></td>
<td><?php echo "<b><font color=brown>:</font></b>" ?></td>
<td><?php echo "<b><font color=green>Prasem</font></b>" ?></td>
</tr>
<tr>
<td><?php echo "<b><font color=orange>Tempat,Tanggal lahir</font></b>" ?></td>
<td><?php echo "<b><font color=brown>:</font></b>" ?></td>
<td><?php echo "<b><font color=green>Malang, 13 Juni 1997</font></b>" ?></td>
</tr>
<tr>
<td><?php echo "<b><font color=orange>Asal SMP</font></b>" ?></td>
<td><?php echo "<b><font color=brown>:</font></b>" ?></td>
<td><?php echo "<b><font color=green>SMPN 5 Malang</font></b>" ?></td>
</tr>
<tr>
<td><?php echo "<b><font color=orange>Alamat</font></b>" ?></td>
<td><?php echo "<b><font color=brown>:</font></b>" ?></td>
<td><?php echo "<b><font color=green>Jln. Gondowangi no. 60 </font></b>" ?></td>
</tr>
<tr>
<td><?php echo "<b><font color=orange>Tinggi/berat</font></b>" ?></td>
<td><?php echo "<b><font color=brown>:</font></b>" ?></td>
<td><?php echo "<b><font color=green>163/53</font></b>" ?></td>
</tr>
<tr>
<td><?php echo "<b><font color=orange>Cita-cita</font></b>" ?></td>
<td><?php echo "<b><font color=brown>:</font></b>" ?></td>
<td><?php echo "<b><font color=green>Beli Mercy</font></b>" ?></td>
</tr>
<tr>
<td><?php echo "<b><font color=orange>Agama</font></b>" ?></td>
<td><?php echo "<b><font color=brown>:</font></b>" ?></td>
<td><?php echo "<b><font color=green>Islam</font></b>" ?></td>
</tr>
<tr>
<td><?php echo "<b><font color=orange>Hobi</font></b>" ?></td>
<td><?php echo "<b><font color=brown>:</font></b>" ?></td>
<td><?php echo "<b><font color=green>Bulu tangkis, berenang</font></b>" ?></td>
</tr>
</table>
</body>
</html>
3. crate new lagi dan isikan dengan Script dibawah ini, dan save as dengan nama "modul_footer"..
<!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=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<center>
<br/>
============================================================<br/>
<font face="Tahoma, Geneva, sans-serif" color="#FF0000">Copyright Prasem 2013</font>
<br/>
============================================================
<br/>
</body>
</html>
4. crate new lagi dan isikan dengan Script dibawah ini, dan save as dengan nama "buatsendiri"
<?php
require ("modul_header.php");
require ("PHP 2.php");
tulistebal ("Saya Punya Motto :");
echo "<br><br>";
echo "<font color=blue><b>$kalimat</b></font>";
require("modul_footer.php");
?>
jika sudah jalankan program (site harus sudah benar)
Langganan:
Posting Komentar (Atom)

Tidak ada komentar:
Posting Komentar