Setelah membuat desainnya, lalu buat link untuk bisa menampilkan tugas yang telah dibuat sebelumnya.caranya :
- blok tugas1
- kemudian ketikkan index.php?menu=t1 pada kotak link.
- demikian juga untuk tugas2,tugas3 sampai tugas6.
- anda tinggal mengganti pemanggilan link nya dimana t1 untuk tugas1, t2 untuk tugas2, dan seterusnya sampai tugas7.
- setelah membuat link, anda tinggal meletakkan kursor pada area kerja ( tentunya masih di area design dari dreamweaver ).
- kemudian ketikkan perintah berikut ini :
<?php
$menu=$_GET['menu'];
if($menu=="t1") {
include"bbm.php";
} else if($menu=="t2") {
include"lampu.php"; }
else if($menu=="t3") {
include"cobadiskoninput.php";
} else if($menu=="t4") {
include"kambing.php";
} else if($menu=="t5") {
include"studio musik.php";
} else if($menu=="t6") {
include"gapeg.php"; }
else {
echo ("Maaf Tugas Yang Anda Cari Tidak Tersedia"); }
?>
Jika selesai maka anda telah sukses membuat include pada suatu
file.
Berikut code lengkapnya :
<!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">
<!--
.style5 {color: #330000}
.style6 {
font-size: large;
color: #330000;
font-weight: bold;
}
.style11 {color: #FFFFFF; font-size: 12px; }
.style14 {color: #FFFFFF; }
-->
</style>
</head>
<body>
<table width="457" height="265" border="1"
align="center" cellpadding="0" cellspacing="0"
bordercolor="#330000">
<tr bgcolor="#0099FF">
<th height="58" colspan="2"
bgcolor="#990000" scope="col"><span
class="style6">Tugas Pemrograman Web 1 </span></th>
</tr>
<tr bordercolor="#333333" bgcolor="#003399">
<td width="107" height="120"
bgcolor="#CCCCCC"><table width="107"
height="159" border="1">
<tr>
<th width="97"
align="center" valign="top" bgcolor="#999999"
scope="col"><a href="index.php?menu=t1"
class="style11">TUGAS 1 </a></th>
</tr>
<tr>
<th align="center"
valign="top" bgcolor="#999999"
scope="col"><a href="index.php?menu=t2"
class="style11">TUGAS 2 </a></th>
</tr>
<tr>
<th align="center"
valign="top" bgcolor="#999999"
scope="col"><a href="index.php?menu=t3"
class="style11">TUGAS 3</a></th>
</tr>
<tr>
<th align="center"
valign="top" bgcolor="#999999"
scope="col"><a href="index.php?menu=t4"
class="style11">TUGAS 4</a> </th>
</tr>
<tr>
<th align="center"
valign="top" bgcolor="#999999"
scope="col"><a href="index.php?menu=t5"
class="style11 style14">TUGAS 5 </a></th>
</tr>
<tr>
<th height="23"
align="center" valign="top" bgcolor="#999999"
scope="col"><a href="index.php?menu=t6"
class="style11">TUGAS 6 </a></th>
</tr>
<tr>
<th height="23"
align="center" valign="top" bgcolor="#999999"
scope="col"><a href="index.php?menu=t7"
class="style11">TUGAS7</a></th>
</tr>
</table></td>
<td width="344" align="center"
valign="top" bgcolor="#FFFFFF"> <p>
<?php
$menu=$_GET['menu'];
if($menu=="t1") {
include"bbm.php";
}
else if($menu=="t2") {
include"lampu.php";
}
else if($menu=="t3") {
include"cobadiskoninput.php";
}
else if($menu=="t4") {
include"kambing.php";
}
else if($menu=="t5") {
include"studio
musik.php";
}
else if($menu=="t6") {
include"gapeg.php";
}
else
{ echo ("Maaf Tugas Yang Anda Cari
Tidak Tersedia");
}
?>
</p>
<p> </p>
<p> </p></td>
</tr>
<tr bordercolor="#333333" bgcolor="#003399">
<td height="31" colspan="2"
bgcolor="#990000"><div align="center" class="style5">copyright
by ahasmiati </div></td>
</tr>
</table>
</body>
</html>
Hasil program untuk tugas 1
<?php
$menu=$_GET['menu'];
if($menu=="t1") {
include"bbm.php";
} else if($menu=="t2") {
include"lampu.php"; }
else if($menu=="t3") {
include"cobadiskoninput.php";
} else if($menu=="t4") {
include"kambing.php";
} else if($menu=="t5") {
include"studio musik.php";
} else if($menu=="t6") {
include"gapeg.php"; }
else {
echo ("Maaf Tugas Yang Anda Cari Tidak Tersedia"); }
?>
Jika selesai maka anda telah sukses membuat include pada suatu file.
Berikut code lengkapnya :
<!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">
<!--
.style5 {color: #330000}
.style6 {
font-size: large;
color: #330000;
font-weight: bold;
}
.style11 {color: #FFFFFF; font-size: 12px; }
.style14 {color: #FFFFFF; }
-->
</style>
</head>
<body>
<table width="457" height="265" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#330000">
<tr bgcolor="#0099FF">
<th height="58" colspan="2" bgcolor="#990000" scope="col"><span class="style6">Tugas Pemrograman Web 1 </span></th>
</tr>
<tr bordercolor="#333333" bgcolor="#003399">
<td width="107" height="120" bgcolor="#CCCCCC"><table width="107" height="159" border="1">
<tr>
<th width="97" align="center" valign="top" bgcolor="#999999" scope="col"><a href="index.php?menu=t1" class="style11">TUGAS 1 </a></th>
</tr>
<tr>
<th align="center" valign="top" bgcolor="#999999" scope="col"><a href="index.php?menu=t2" class="style11">TUGAS 2 </a></th>
</tr>
<tr>
<th align="center" valign="top" bgcolor="#999999" scope="col"><a href="index.php?menu=t3" class="style11">TUGAS 3</a></th>
</tr>
<tr>
<th align="center" valign="top" bgcolor="#999999" scope="col"><a href="index.php?menu=t4" class="style11">TUGAS 4</a> </th>
</tr>
<tr>
<th align="center" valign="top" bgcolor="#999999" scope="col"><a href="index.php?menu=t5" class="style11 style14">TUGAS 5 </a></th>
</tr>
<tr>
<th height="23" align="center" valign="top" bgcolor="#999999" scope="col"><a href="index.php?menu=t6" class="style11">TUGAS 6 </a></th>
</tr>
<tr>
<th height="23" align="center" valign="top" bgcolor="#999999" scope="col"><a href="index.php?menu=t7" class="style11">TUGAS7</a></th>
</tr>
</table></td>
<td width="344" align="center" valign="top" bgcolor="#FFFFFF"> <p>
<?php
$menu=$_GET['menu'];
if($menu=="t1") {
include"bbm.php";
}
else if($menu=="t2") {
include"lampu.php";
}
else if($menu=="t3") {
include"cobadiskoninput.php";
}
else if($menu=="t4") {
include"kambing.php";
}
else if($menu=="t5") {
include"studio musik.php";
}
else if($menu=="t6") {
include"gapeg.php";
}
else
{ echo ("Maaf Tugas Yang Anda Cari Tidak Tersedia");
}
?>
</p>
<p> </p>
<p> </p></td>
</tr>
<tr bordercolor="#333333" bgcolor="#003399">
<td height="31" colspan="2" bgcolor="#990000"><div align="center" class="style5">copyright by ahasmiati </div></td>
</tr>
</table>
</body>
</html>
if($menu=="t1") {
include"bbm.php";
} else if($menu=="t2") {
include"lampu.php"; }
else if($menu=="t3") {
include"cobadiskoninput.php";
} else if($menu=="t4") {
include"kambing.php";
} else if($menu=="t5") {
include"studio musik.php";
} else if($menu=="t6") {
include"gapeg.php"; }
else {
echo ("Maaf Tugas Yang Anda Cari Tidak Tersedia"); }
?>
Jika selesai maka anda telah sukses membuat include pada suatu file.
Berikut code lengkapnya :
<!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">
<!--
.style5 {color: #330000}
.style6 {
font-size: large;
color: #330000;
font-weight: bold;
}
.style11 {color: #FFFFFF; font-size: 12px; }
.style14 {color: #FFFFFF; }
-->
</style>
</head>
<body>
<table width="457" height="265" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#330000">
<tr bgcolor="#0099FF">
<th height="58" colspan="2" bgcolor="#990000" scope="col"><span class="style6">Tugas Pemrograman Web 1 </span></th>
</tr>
<tr bordercolor="#333333" bgcolor="#003399">
<td width="107" height="120" bgcolor="#CCCCCC"><table width="107" height="159" border="1">
<tr>
<th width="97" align="center" valign="top" bgcolor="#999999" scope="col"><a href="index.php?menu=t1" class="style11">TUGAS 1 </a></th>
</tr>
<tr>
<th align="center" valign="top" bgcolor="#999999" scope="col"><a href="index.php?menu=t2" class="style11">TUGAS 2 </a></th>
</tr>
<tr>
<th align="center" valign="top" bgcolor="#999999" scope="col"><a href="index.php?menu=t3" class="style11">TUGAS 3</a></th>
</tr>
<tr>
<th align="center" valign="top" bgcolor="#999999" scope="col"><a href="index.php?menu=t4" class="style11">TUGAS 4</a> </th>
</tr>
<tr>
<th align="center" valign="top" bgcolor="#999999" scope="col"><a href="index.php?menu=t5" class="style11 style14">TUGAS 5 </a></th>
</tr>
<tr>
<th height="23" align="center" valign="top" bgcolor="#999999" scope="col"><a href="index.php?menu=t6" class="style11">TUGAS 6 </a></th>
</tr>
<tr>
<th height="23" align="center" valign="top" bgcolor="#999999" scope="col"><a href="index.php?menu=t7" class="style11">TUGAS7</a></th>
</tr>
</table></td>
<td width="344" align="center" valign="top" bgcolor="#FFFFFF"> <p>
<?php
$menu=$_GET['menu'];
if($menu=="t1") {
include"bbm.php";
}
else if($menu=="t2") {
include"lampu.php";
}
else if($menu=="t3") {
include"cobadiskoninput.php";
}
else if($menu=="t4") {
include"kambing.php";
}
else if($menu=="t5") {
include"studio musik.php";
}
else if($menu=="t6") {
include"gapeg.php";
}
else
{ echo ("Maaf Tugas Yang Anda Cari Tidak Tersedia");
}
?>
</p>
<p> </p>
<p> </p></td>
</tr>
<tr bordercolor="#333333" bgcolor="#003399">
<td height="31" colspan="2" bgcolor="#990000"><div align="center" class="style5">copyright by ahasmiati </div></td>
</tr>
</table>
</body>
</html>
Tidak ada komentar:
Posting Komentar