Mal's Web Madness

A basic tutorial on building websites with PHP


Introduction
The Web Page Files
Let's Start
Making It Work
Making More Pages
Making Links
Making Things Sexy

Making links

It would be a real PAIN if we had to reopen all our .php files (index.php, austria.php, majorca.php) and add the link code to each of them.

In the bad old days people used to write pages with frames to get around that problem, but frames were dependant on browsers and all sorts of other problems. Now we have PHP working on the server to do it all easily for us!

Let's begin...

1. Open a new notepad file
2. Type:

<A HREF="index.php">Home Page</A> |
<A HREF="austria.php">Austria</A> |
<A HREF="majorca.php">Majorca</A> |

3. Save the file as nav.inc

4. Open head.inc in notepad.
5. Under <BODY> type:

<?php
include "nav.inc";
?>

Save it.

6. FTP nav.inc and the new head.inc to your server.
7. Point your browser to index.php again

You will see that those two itsy bitsy little changes have now given you a fully interactive website!


It is still the most boring website on the Internet. How can I make everything look better?

Create one other simple text file... styles.css