|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
index.php?id=1 --> Q: How is this done?
Hi,
I'm new PHP code. And I've seen pages with following address -- ...index.php?id=1. Q: How is this done? Q: Are they using ISSET method? ...defining a variable with include file? For example, this web site utilizes this method. I would like a link in my index.php file, once clicked, to display additional content using the id=1 method... Thankx in advance, Arthur |
|
#2
|
|||
|
|||
|
something like that is usually generated from a database
PHP Code:
That would print a list of links, each with there own unique ids then to retrive that value, you would use the following code on page.php PHP Code:
or you could use that id as a index to query the database and get the selected information PHP Code:
|
|
#3
|
|||
|
|||
|
it is possible that it is not being fetched from a db. example: index.php?id=about could be including the /content/about.php file into the template (if they are using a system of some sort)
__________________
![]() ![]() "Only Linux users see the end of crashes." - Pl4t0 |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > index.php?id=1 --> Q: How is this done? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|