Membuat Menu Index PHP menggunaan Tabel

Langkah :

1. Siapkan Cover.jpg
2. Buat program buka_file.php
3. Buat Menu INdex menggunakan Tabel



buka_file.php

<?php

$page = isset($_GET['page']) ? $_GET['page'] : null;
switch($page){
case 'input':if (!file_exists("inputbarang.php"))
die ("Data Tidak Ada");
include "inputbarang.php";
break;
}

switch($page){
case 'transaksi':if (!file_exists("tr_penjualan.php"))
die ("Data Tidak Ada");
include "tr_penjualan.php";
break;
}

switch($page){
case 'laporan':if (!file_exists("tampil_barang.php"))
die ("Data Tidak Ada");
include "tampil_barang.php";
break;
}

switch($page){
case 'buku_tamu':if (!file_exists("buku_tamu.php"))
die ("Data Tidak Ada");
include "buku_tamu.php";
break;
}
?>


index.php

<!DOCTYPE html>
<html>
<head>
<title>Menu</title>
</head>
<body>
<table width="879" border="0" align="center" bgcolor="yellow">
  <tr>
    <td height="105" colspan="4"><img src="website.jpg" width="1500" height="110" border="0"/></td>
  </tr>
  <tr>
    <td width="120" rowspan="4" valign="top" bgcolor="">
  <table width="118" border="0" align="center" bgcolor="green">
      <tr>
        <td width="120" bgcolor=""><div align="left"><span class="style7">MENU</span></div></td>
      </tr>
      <tr>
        <td bgcolor=""><div align="left"><strong><a href="?page=input">Master</a></strong></div></td>
      </tr>
      <tr>
        <td bgcolor=""><div align="left"><a href="?page=transaksi"><strong>Transaksi</strong></div></td>
      </tr>
      <tr>
        <td bgcolor=""><div align="left"><strong><a href="?page=laporan">Laporan</a></strong></div></td>
      </tr>
  <tr>
        <td bgcolor=""><div align="left"><strong><a href="?page=buku_tamu">Buku Tamu</a></strong></div></td>
      </tr>
    </table></td>
    <td colspan="2" rowspan="4" valign="top" bgcolor="">
<table width="604" border="0" align="center" bgcolor="grey">
      <tr>
        <td width="500" bgcolor=""><?php include "buka_file.php"; ?></td>
      </tr>
    </table></td>
    <td width="141" bgcolor="">
<table width="130" border="0" bgcolor="pink">
      <tr>
        <td width="150" bgcolor=""><?php include "";?></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td></td>
  </tr>
  <tr>
    <td valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td height="34"></td>
  </tr>
  <tr>
    <td bgcolor="">&nbsp;</td>
    <td width="315" bgcolor=""><?php include(""); ?>&nbsp;</td>
    <td width="285" bgcolor="">&nbsp;</td>
    <td bgcolor="">&nbsp;</td>
  </tr>
</table>
</body>
</html>




More

Whats Hot