User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 456,567 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,595 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 495 | Replies: 1
Reply
Join Date: Sep 2007
Posts: 3
Reputation: aso186 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
aso186 aso186 is offline Offline
Newbie Poster

Question PHP ?queries - How to?

  #1  
Oct 21st, 2007
I am relatively new to php and I want to create a basic page with dynamic content. So say I have a page called products.php that acts as an index to my products, a link such as products.php?product=box would go to a page with the particular details of 'box' and products.php?product=chair would go to a page with the details of 'chair' etc. And is there a way to do this without register_globals switched on?

Many thanks

Alex
Last edited by aso186 : Oct 21st, 2007 at 10:41 am.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2007
Location: Morrisdale, PA
Posts: 52
Reputation: JeniF is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 5
JeniF's Avatar
JeniF JeniF is offline Offline
Junior Poster in Training

Re: PHP ?queries - How to?

  #2  
Oct 21st, 2007
If you are using a database to store the information, create a recordset for your values displayed on your product page.
the example below will take the user to a page called productInfo.php and display the information about the "ID" of the item selected. (This carries the variable of"ID" in the url)

<a href="productInfo.php?ID=<? echo $row_rsInfo['ID'];?></a>

On the productInfo page create another recordset that is filtered by the URL parameter of you variable set (in this case I am using "ID")
once the productInfo.php loads, it will display the information about that particular item.
I keep hitting "escape", but I'm still here!!!!
:}
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 5:54 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC