PHP links
8 posts
• Page 1 of 1
PHP links
Well i got a website... i started again... fresh and now i want to have it all php based (well most of it) but im not sure how to get the links working like "index.php?id=page_one" as im quite a new at php. But i know some stuff
can someone sugest a tutorials or whatever to help me please?
thanks
- [Dima]
You are going to have to gain familiarity with manipulating the query string if you want to use the specifics you mentioned above.
There are quite honestly hundreds of ways of implementing an ?id=page_one like setup.
All variables passed in via the query string are accessible via the superglobal $_GET array. Let's say someone requests the page http://test.com/index.php?id=mydoc&page=2 . If register_globals is turned on (which is highly discouraged for security) then two variables would be created called $id and $page and they would be created in global scope.
If register_globals is turned off then the variables would be accessible from $_GET['id'] and $_GET['page'].
You can then use fopen() or include() or some other mechanism to open up files represented by these values. Tada.
-Weaver
Public Keys
The primary purpose of the DATA statement is to give names to constants; instead of referring to pi as 3.141592653589793 at every appearance, the variable PI can be given that value with a DATA statement and used instead of the longer form of the constant. This also simplifies modifying the program, should the value of pi change.
-- FORTRAN manual for Xerox Computers
The primary purpose of the DATA statement is to give names to constants; instead of referring to pi as 3.141592653589793 at every appearance, the variable PI can be given that value with a DATA statement and used instead of the longer form of the constant. This also simplifies modifying the program, should the value of pi change.
-- FORTRAN manual for Xerox Computers
- Weaver
- PROfessional Member
- Posts: 1967
- Joined: Wed Jun 19, 2002 12:05 am
- Location: /home/weaver/
YEYE!!!! after a few hours (more like 20) i got the links to work!!!
thank you weaver!!
heres the site btw (still not anywhere near comletion) http://keitx.myftp.org
thank you weaver!!
heres the site btw (still not anywhere near comletion) http://keitx.myftp.org
- [Dima]
8 posts
• Page 1 of 1
Return to HTML, CSS, and Scripts
Who is online
Users browsing this forum: No registered users and 7 guests