|
 |
|
|
|
|
|
Note 1: You don't have to know PHP programming to do this tutorial.
Note 2: I assume that your server supports files with .php extension. If not, you won't be able to do this tutorial. For more info on how to install PHP on your PC go to http://www.php.net
Purpose of this tutorials is to teach you how to design a website that is easily modified or updated. If you have a website with ten pages, updating should not be a problem. But how about if you have more pages..? Here comes the help of PHP. Of course it could be done with other programming languages like .asp, .jsp etc, but personally I prefer PHP. I guess you noticed that from the extension of my pages.
The point I am trying to make is, you can have your menu in one page for example and display it in every page of your website. When you want to change something in the menu, you have to edit only one page, and it automatically changes in other pages. Because you only link from other pages to menu page. Let's start with the tutorial.
Step 1 :
Open Notepad and type the following as shown below and name it "HEADER.php"
| CODE |
<html>
<head>
<title>Swish-DB Design</title>
</head>
<body>
Top Menu goes right here<br>
|
Step 2 :
Creat new File and write down just like this and Name it "MAIN.php"
| CODE |
Main Part of your page goes here<br>
|
Step 3 :
and new file following these code then name it as "FOOTER.php"
| CODE |
Copyleft
</body>
</html>
|
What we have done here is, we created three different .php files namely: header.php, main.php and footer.php. Later we will be linking them together within a page to create one whole page. Basicaly header.php should include all the meta tags and top menu. And main.php should include all the body content. As for the footer.php it will include Copyright notes and other content like bottom menu.
Step 4 :
Next we link them together. Open another new file in your notepad and type the following. This is how the linking in PHP done.
| CODE |
<?php
include("HEADER.php");
include("MAIN.php");
include("FOOTER.php");
?>
|
or it can be done like this :
| CODE |
<?php include("HEADER.php"); ?>
<?php include("MAIN.php"); ?>
<?php include("FOOTER.php"); ?>
|
then now test it in your server or *localhost
note
*PHP Required for windows :
| QUOTE |
phpdev423: Want to install PHP, MySQL, Apache, and phpMyAdmin all together? It will install all of these with one click, great tool indeed.
Download here: phpdev423.exe If the download link does not work go to the page: http://www.firepages.com.au Size: 10.49 MB
|
or you can use PHPTriad
ok thats it... hehehe lol.. long enaugh
hope it helps
|
|
|
|