| Posted on March 21, 2013 at 2:20 AM |
Lanjut lagi,
materi lanjutan dari Ayo belajar membuat website 1
Buka Dreamwever anda, buat sebuah file php baru
Lalu anda tuliskan script seperti berikut
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="shortcut icon" href="images/favicon.ico" >
<title>:: SMK NEGERI 3 LUBUKLINGGAU : your excelent choice ::</title>
<style type="text/css">
<!--
.style1 {color: #66CCFF}
.style3 {color: #FFFFFF}
.style6 {font-family: monospace}
-->
</style>
</head>
<body bgcolor="#fbf8f8">
<table width="50%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#0099FF">
<tr>
<td colspan="2"><div align="center"><img src="images/header.gif" width="807" height="146" /></div></td>
</tr>
<tr>
<td width="194" valign="top"><table width="188" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
<td > </td>
</tr>
<tr>
<td width="36"><img src="images/menu-bullet.gif" width="20" height="25" /></td>
<td width="152" ><p class="style1"><a href="?halaman=Home"class="style6">Beranda</a></p></td>
</tr>
<tr>
<td><img src="images/menu-bullet.gif" width="20" height="25" /></td>
<td><a href="?halaman=Profil" class="style6">Profil Sekolah </a></td>
</tr>
<tr>
<td><img src="images/menu-bullet.gif" width="20" height="25" /></td>
<td><a href="index.php?page=fasilitas" class="style6">Fasilitas</a></td>
</tr>
<tr>
<td><img src="images/menu-bullet.gif" width="20" height="25" /></td>
<td><a href="?halaman=Prestasi" class="style6">Prestasi</a></td>
</tr>
<tr>
<td><img src="images/menu-bullet.gif" width="20" height="25" /></td>
<td><a href="index.php?page=pengajar" class="style6">Staf Pengajar </a></td>
</tr>
<tr>
<td><img src="images/menu-bullet.gif" width="20" height="25" /></td>
<td><a href="index.php?page=denah" class="style6">Denah</a></td>
</tr>
<tr>
<td><img src="images/menu-bullet.gif" width="20" height="25" /></td>
<td><a href="index.php?page=berita" class="style6">Berita</a></td>
</tr>
<tr>
<td><img src="images/menu-bullet.gif" width="20" height="25" /></td>
<td><p><a href="index.php?page=bukutamu" class="style6">Buku Tamu </a></p>
</td>
</tr>
<tr>
<td><img src="images/menu-bullet.gif" width="20" height="25" /></td>
<td><p><a href="index.php?page=alumni" class="style6">Alumni</a></p>
</td>
</tr>
</table></td>
<td width="613" valign="top" bgcolor="#FFFFFF"><table width="600" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td width="600" align="center"><h3><font color="#6633CC"><?php print($menu) ?> </font></h3></td>
</tr>
<tr>
<td><hr></td>
</tr>
<tr>
<td><font color="#6600FF"><?php include "bukahalaman.php";?></font></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"><hr />
<p align="center" class="style3">© 2013, SMK NEGERI 3 LUBUKLINGGAU Powered By : Lukman Edy </p> </td>
</tr>
</table>
</body>
</html>
Simpan file ini dengan nama template.php
Lanjut lagi yoo
buat document php baru lagi tekan ctrl + new pilih php tekan create
<?php
function PrintModules($arr_modules) {
foreach($arr_modules as $modfname) {
include($modfname);
}
}
?>
Simpan file ini dengan nama globals.php
mumpung lagi asiik kita lanjutkan
buat document php baru lagi tekan ctrl + new pilih php tekan create
<?php
include("template.php");
?>
Simpan file ini dengan nama index.php
Lanjutkan pak beye
buat document php baru lagi tekan ctrl + new pilih php tekan create
<?PHP
$koneksi=mysql_connect('localhost','root','');
if (!$koneksi)
{print "koneksi tidak berhasil";
}
mysql_select_db("smk3");
Simpan file ini dengan nama koneksi.php
Semua file diatas simpan kedalam folder C: xampp/htdoc/lalu anda buat folder baru dan beri nama web_dinamis, sesuaikan di mana anda menginstal xampp di komputer anda.
sekian dulu utk hari ini capek bro, bsok kita lanjut lagi
Categories: None
The words you entered did not match the given text. Please try again.
tigor says...
yang coding untuk sambutan????

Oops!
Oops, you forgot something.