Hi
I am newbie in PHP Programming or in any programming languages
but Im willing to learn in PHP Programming
My first project for myself is to create a simple website with a MENU Navigation like Home, About US, Contacts US and News.
here is my CODE:
<html>
<head>
<title>My First Website</title>
<style type="text/css">
body {
font-family: Verdana;
font-size: 12px;
alignment-adjust: middle;
}
a {
color: #000;
margin-right: 10px;
}
#menu {
font-size: 10px;
border-bottom: 1px solid #000;
margin-left: auto;
margin-right: auto;
width: 650px;
padding: 5px;
}
</style>
<div id="header"><h1>My First Website</h1>
</div>
<div id="menu">
<a href="index.php">Home</a>
<a href="index.php?p=aboutus">About us</a>
<a href="index.php?p=contacus">Contact us</a>
<a href="index.php?p=news">News</a>
</div>
<div id="content">
<?php
$pages_dir = 'pages';
if (!empty($_GET['p'])) {
$pages = scandir($pages_dir, 0);
unset($pages[0], $pages[1]);
$p = $_GET['p'];
if (in_array($p.'.php', $pages)) {
include ($pages_dir.'/'.$p.'.php');
} else {
echo 'Sorry, Page has not found.';
}
} else {
include($pages_dir.'/index.php');
}
?>
</div>
</body>
</head>
</html>
I just want to insert images in every menu navigation or enchance it not just only a text.
Thanks in advance