Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Dynamic Php Pages, Nice tutorial
mr ? impressive
post 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
Go to the top of the page
 
+Quote Post
jlhaslip
post 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 Icon

Group: [MODERATOR]
Posts: 3,868
Joined: 24-July 05
From: In Trouble Again... still?
Member No.: 9,787
Spam Patrol



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.
Go to the top of the page
 
+Quote Post
shadowx
post 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.

Go to the top of the page
 
+Quote Post
Galahad
post 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 smile.gif
Go to the top of the page
 
+Quote Post
farsiscript
post 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";
}
Go to the top of the page
 
+Quote Post
alex1985
post 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.

QUOTE(mr ? impressive @ Feb 17 2007, 09:37 AM) *
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!

Notice from rvalkass:

Merged double post. Remember you can use the Edit button.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Nice Gallery Script?(9)
  2. Calling A Variable From A Dynamic List In A Sql Statement(2)
  3. Php Dynamic News Updating Using Mysql(3)
  4. Php Classes(1)
  5. Just About Completed My Own Message Board Source.(10)
  6. Securing Pages(2)
  7. Blocking Pages & Making Ranks(4)
  8. Parsing .html Pages(9)
  9. Changing Include Tag On All Pages(11)
  10. Good Editor(1)
  11. Search Site Pages Using Keywords?(6)
  12. Dynamic Included Menus(8)
  13. Here's A Nice And Interesting Way To Make Comments(9)
  14. Dynamic Drop Down List <select>(3)
  15. Dynamic Image / Signature Generator(12)
  1. Putting Data Of 2 Pages In Mysql At Once(1)
  2. More Dynamic ?id=browsing With Php (associative Array)(1)
  3. Can I Make Dynamic Menu In Php(7)
  4. Trap17 Board Status Dynamic Image(13)
  5. Php Pages Permission On Apache Server(1)
  6. Php An Js Window.open Pages Trouble.(3)
  7. Getting An Array Value Of A Dynamic Variable(9)
  8. Php Pages Problem [resolved](5)
  9. 2 Pages Into One(10)
  10. Protect Pages(20)
  11. Pagination(3)


 



- Lo-Fi Version Time is now: 20th July 2008 - 08:32 PM