| | |||||
| ||||||||
| Webmaster Tutorials Instructional webmaster-related how-to's and tutorials. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Regular Join Date: Aug 2006 Location: Liverpool, England
Posts: 405
![]() ![]() | PHP TUTORIAL: index.php?page=yourpage Ever wondered how websites have different url navigation? In this tutorial i will show you how to stop using the boring: Code: http://mysite.com/contact.php http://mysite.com/faq.php Code: http://mysite.com/?page=contact http://mysite.com/?page=faq ????: NamePros.com http://www.namepros.com/webmaster-tutorials/293008-php-tutorial-index-php-page-yourpage.html Create all your other files seperately not including the template structure. Already done that?.. Now interigate this code into the part of your template you want the page to show up in. PHP Code: PHP Code: PHP Code: PHP Code: You can add as many elseif statements as you like, depending on the number of pages you decide to use. PHP Code: I hope this tutorial has simplified the ?page=yourpage navigation and how it done, feel free to comment, constructive critacism is welcomed. Thanks, Declan.
Last edited by LogiK; 02-11-2007 at 01:36 PM.
|
| |
| | #4 (permalink) |
| NamePros Member Join Date: Nov 2005 Location: Atherstone, UK
Posts: 29
![]() | Nice tutorial, however you could make it shorter and simpler. ![]() PHP Code:
__________________ UK TV Channels |
| |
| | #6 (permalink) |
| NamePros Member Join Date: Nov 2005 Location: Atherstone, UK
Posts: 29
![]() | True, but using PHP Code:
__________________ UK TV Channels |
| |
| | THREAD STARTER #7 (permalink) | ||||
| NamePros Regular Join Date: Aug 2006 Location: Liverpool, England
Posts: 405
![]() ![]() |
That ^^^ would not work, because if someone put in page=catmonkeyfish PHP would try & inlcude catmonkeyfish.php, Therefore my way is a tried & tested effective way. | ||||
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |