Ok i'll post the first tutorial here, I hope it's a good one
If you are wondering how people do the url/index.php?id=News this is the tutorial for it
I hope you understand what I say in this tutorial, I'll try to make it easy.
Create your main file, index.php
create your menu, no links yet
example:
now go to the part of your file where you want that the content changeCode:<table width="125" cellpadding="0" cellspacing="0"> <tr><td>Menu</td></tr> <tr><td>News</td></tr> <tr><td>Members</td></tr> </table>
and put something like this
You can add more ids in there if you want.Code:<?php $id = $_REQUEST['id']; // this will get the id of the link, this will be explained later. switch($id) { // make a case with the id default: include('main.php'); //When page is loaded this will be the main content, put the content in main.php(you can change the name) break; // close this case case "News": include('news.php'); // The content in news.php will be called when id=News break; // close this case case "Members": include('members.php'); // The content in members.php will be called when id=Members break; // close this case } // close switch ?>
Now go back to your menu and we are going to add the links
add this kind of link to your menu
with my example it will be like below.Code:<a href="index.php?id=ID THAT YOU WANT" target="_self">TEXT</a>
the id=News is equal to the case "News" in the php function
This Was the tutorial, I hope you liked it and you learned something.Code:<table width="125" cellpadding="0" cellspacing="0"> <tr><td>Menu</td></tr> <tr><td><a href="index.php?id=News" target="_self">News</a></td></tr> <tr><td><a href="index.php?id=Members" target="_self">Members</a></td></tr> </table>
Nightscream


LinkBack URL
About LinkBacks


Reply With Quote





