|
|
|
|
![]() ![]() |
Feb 17 2007, 05:37 AM
Post
#1
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 34 Joined: 17-February 07 Member No.: 38,796 |
This is a really good tutorial on making php pages that normally appear as www.domainname.com/links.php appear as
www.domainname.com/index.php?page=links http://nuwen.com/tutorials/php-dynamic-pages |
|
|
|
Feb 17 2007, 05:44 AM
Post
#2
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 3,868 Joined: 24-July 05 From: In Trouble Again... still? Member No.: 9,787 ![]() |
Providing a link is not the same as writing a tutorial.
Moving to the php sub-forum. Please read the pinned topics about what is an acceptable Tutorial, thanks. |
|
|
|
Feb 17 2007, 02:20 PM
Post
#3
|
|
|
A clever man learns from his own mistakes, a WISE man learns from those of OTHERS ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 884 Joined: 12-April 06 From: Essex, UK Member No.: 21,719 |
The tutorial isnt bad but in my opinion its not much of a tutorial, it basically gives you some code and says look at that, now copy and paste, change a few variable names and youve just written some code. I prefer tutorials that are more like: Ok we need this this and this, to make it work we put this here and that there, now test it and see how it works, now change this that and that etc etc etc... But still if you wanted a quick system that seems good at a glance.
i did a system similar to this myself but it worked in a very different way, instead of using a case statement i simply used an IF to make sure that the page variable wasnt NULL and then used the page variable value eg "news" as the page name so that would link to a file called "news.htm" just added ".htm" to the end of the page variable's value and tried to open that file, if it works then they see the page, if not they get an error also controlled by an IF statement I suppose its not the most secure method but it seems to work, ive tried to open files in other directories and on other domains and i just get an error. |
|
|
|
Feb 17 2007, 06:03 PM
Post
#4
|
|
|
Neurotical Squirrel ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 579 Joined: 4-November 04 From: Novi Sad, Vojvodina Member No.: 2,127 |
Such dynamic scripts are very useful... I had a similar script, that took page variable, and based on it's number, showed certain file, defined in $pages array...
I made that script way back, when I was new to PHP... Today, I'm still no expert, but new version of script will use MySQL, to display text that would appear when certain page is expected... Main advantage of using MySQL for content, is that you can have some sort of a back office, to update your site, from anywhere in the world, you save disk space, and you can have one unique template for all pages... Or you can even put entire templates inside MySQL... Possibilities are endless |
|
|
|
Feb 18 2007, 08:59 AM
Post
#5
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 357 Joined: 8-April 06 Member No.: 21,487 |
dear mr ? impressive you must use action in php
for example CODE if (action ==" anypage){
load page goes here inlcude "Your File address"; }elseif ( action == "anypage 2"){ //load an other page inlcude "Your File address"; } |
|
|
|
Mar 25 2008, 04:29 AM
Post
#6
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 387 Joined: 9-February 08 Member No.: 57,615 |
That is really useful, that's what I was searching for.
This is a really good tutorial on making php pages that normally appear as www.domainname.com/links.php appear as www.domainname.com/index.php?page=links http://nuwen.com/tutorials/php-dynamic-pages This given link does not work, like that article can be found on that web-site! |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 20th July 2008 - 08:32 PM |