Jump to content
xisto Community
mr ? impressive

Dynamic Php Pages Nice tutorial

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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 statementI 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.

Share this post


Link to post
Share on other sites

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 :P

Share this post


Link to post
Share on other sites

dear mr ? impressive you must use action in php
for example

if (action ==" anypage){load page goes hereinlcude "Your File address";}elseif ( action == "anypage 2"){//load an other pageinlcude "Your File address";}

Share this post


Link to post
Share on other sites

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 http://forums.xisto.com/no_longer_exists/ appear as
http://www.domainname.com/index.php?page=links

http://forums.xisto.com/no_longer_exists/


This given link does not work, like that article can be found on that web-site!

Notice from rvalkass:

Merged double post. Remember you can use the Edit button.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.