| Forum |
|
|||||||
| Tutorials This section offers tutorials and How to's on just about anything related to computers and IT. Note: All tutorials are courtesy the posters and not verified by Digit |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Be CoOl rAp RuLeZ !!!
Join Date: Feb 2007
Posts: 1,968
|
Note: Your server must have php installed for this to work and your extensions should end in .php. And on to the tutorial: This is the basic code I use, you can copy it and put it on your page! Note This code would go in your main content area. <?php switch($id) { default: include(’news.php’); break; case ‘about’ : include(’about.html’); break; } ?> Thats it, however i will explain it in a bit more depth.. default: include(’news.php’); break; This is the main page you want to open when you load your website for most people its news and updates etc. This can be php or html or whatever. case ‘about’ : include(’about.html’); break; This is the page you want to include next such as an about page etc. Keep adding the pages so you got all you need. Your code will look like something below: <?php switch($id) { default: include(’news.php’); break; case ‘about’ : include(’about.html’); break; case ‘tutorials’ : include(’tutorials.php’); break; case ‘downloads’ : include(’downloads.html’); break; case ‘templates’ : include(’temps.html’); break; case ‘comming’ : include(’soon.html’); break; } ?> Now if you are not completely lost yet this is what you do to link your pages, Change your links from <a href=”about.html” mce_href=”about.html”>About</a> to <a href=”?id=about” mce_href=”?id=about”>About</a> if you like this please comment on my blog post
__________________
iPhone 3G 16GB + Samsung I450 + Sennheiser CXL 400 + PSP Phat + Samsung NC10 Previous phones: N73ME , W810I , Asus P320 |
|
|
| Advertisements. Register and be a member of the community to get rid of them. | |
|
Advertisement
|
|
|
|
#2 (permalink) |
|
Wise Old Owl
Join Date: Nov 2006
Location: Pune, Maharashtra, India
Posts: 1,728
|
Dude, this every small Web Designer knows. huh. Anyone developing in PHP knows this.
__________________
KDE on ArchLinux PHP, MySQL, PostgreSQL, Linux, Apache; Message me to hire (freelancing only) Explore Technology @ http://www.itech7.com Cheap and Reliable VPS Hosting @ http://j.mp/arHk5e |
|
|
|
|
#4 (permalink) | |
|
Wise Old Owl
Join Date: Nov 2006
Location: Pune, Maharashtra, India
Posts: 1,728
|
Quote:
__________________
KDE on ArchLinux PHP, MySQL, PostgreSQL, Linux, Apache; Message me to hire (freelancing only) Explore Technology @ http://www.itech7.com Cheap and Reliable VPS Hosting @ http://j.mp/arHk5e |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help me in Navigation Menu | satyamy | QnA (read only) | 3 | 26-05-2007 12:56 AM |
| Bring VIM-like navigation to Firefox | eddie | Technology News | 12 | 07-05-2007 11:33 AM |
| new solution for off-board navigation | coolbzl | QnA (read only) | 3 | 05-06-2006 04:27 PM |
| problems in broadband navigation using Sify | techkid | Broadband and DTH | 5 | 15-02-2005 08:30 AM |