ok, lot of ppl just want to use PHP to get this fancy links. so ppl think they are great programmers. is not bad tho :P
i'll show u how in 5 mins using switch function.
its really, pretty easy.
and you will also learn how to arrange your files
ok, its pretty easy. im not good make tuts btw :P
we're gonna creat a file called index.php. this is our main file. and will have something like this:
Code:
<html></html>
<head>
<title>TITLE OF THE WEBSITE</title>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<!-- this is the banner row -->
HERE WE HAVE THE BANNER OF THE SITE!!!</td>
</tr>
<tr>
<td>
<!-- this is the content row -->
<?
//here is where the switch part starts
switch ($categorie) //the var $categorie can be whatever you want. and is going to be this part of the URL: index.php?&categorie
{
case "content1"://in the URL: =content1
include("content1.htm");
break;
case "links":
include("content2.htm");//in the URL: =content2
break;
default: //in case that the URL doesnt have anything (index.php) is going use home.htm
include("home.htm");
}
//here is where the switch part ends
?> </td>
</tr>
<tr>
<td><!-- this is the bottom row -->
HERE WE CAN PUT THE COPYRIGHT AND STUFF
</td>
</tr>
</table>
</body>
</html>
ok here is the funny part.
when you type the URL index.php?&categorie=content1 you are telling the script to use the var CATEGORIE and the instruction under the name CONTENT1. this instruction is going to display the information inside content1.htm the top row and the borrom row are going to be the same.
WTF? well lets see what does home.htm & content1.htm has:
HOME.HTM
Code:
<td>
<p>this is the home page<br />
here you may have the news and stuff</p>
</td>
CONTENT1.HTM
Code:
<td>
<p>this is the content1 page<br />
this is just going
to have whatever you want :P lol</p>
<p> </p>
<p>blah blah blah </p></td>