Dynamic Links & Passing queries through address bar

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
zander213
Forum Newbie
Posts: 13
Joined: Mon Aug 23, 2004 1:46 pm

Dynamic Links & Passing queries through address bar

Post by zander213 »

I am trying to connect page A to page B where page A is a list of all the possible page Bs...

Any ideas on the best way to create dynamic links using an item number, and also how to pass queries through the url to bring up page B based on item number? (pageB.php/itemnumber)

ex:
Page A would contain links like this... to the page B links
http://website.com/pageA.php/<?php echo $row_product['itemnumber']; ?>.php
http://website.com/pageA.php/<?php echo $row_product['itemnumber']; ?>.php

Sorry - i'm new at this. Any direction would be greatly appreciated. Part of my problem is that I don't really know what this is called...

Thanks again!
rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

this would be easier


pageb.php?itemid=<?php echo $row['itemid']; ?>


then you can access the item id without parsing the request uri

you would just do

$itemid = $_GET['itemid'];


fyi-what you were doing, is usually accessed by some variable named path info

path info contains the url part to the right of the currently executing script's filename

its more common to just use a query string though(by using ?)
Post Reply