This is a discussion on links within the PHP Language forums, part of the PHP Programming Forums category; Iv set up my pages so that when a user searches for something it returns those results as a list, (...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Iv set up my pages so that when a user searches for something it returns
those results as a list, (i used a simple form for this). Now i want each item in that list to be a link to a page that will give more information on that item is this possible? I have the code for querying the database and printing all the information out i just don't know how to send the variable, to be queried, to this new page. Hope that makes sense, im a php beginner and all help is appreciated David |
|
|||
|
David wrote:
> Iv set up my pages so that when a user searches for something it > returns those results as a list, (i used a simple form for this). Now > i want each item in that list to be a link to a page that will give > more information on that item is this possible? I have the code for > querying the database and printing all the information out i just > don't know how to send the variable, to be queried, to this new page. > > Hope that makes sense, im a php beginner and all help is appreciated > David I'm assuming that you have some unique ID in your database (like linkID or something) that allows you to refer to a specific link - if so, just print out something like: <a href="moreinfo.php?linkID=whatever">blah</a> (fetch the linkid from the database), and then on moreinfo.php, do something like $id = intval($_GET['linkID'); mysql_query("SELECT whataever FROM links WHERE linkID='$id'"); .... |