By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,723 Members | 1,891 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,723 IT Pros & Developers. It's quick & easy.

help identifying the clicked record

P: n/a
i already know how to load the my list of suppliers using
mysql/php/apache, but what i would like to do now is put a link for
each and every supplier and when someone clicks it, they will
automatically go to that supplier's list of products.

i want something like this:

SUPPLIERS TABLE
supplierID, Name, Address,

AA Alfin21 1506 w. 66th street <>EDIT<>

how do i accomplish this?
i would be pretty pleased if anyone can help me out here. THANX FOR
YOUR TIME IN ADVANCE :)
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
angel duran wrote:
i already know how to load the my list of suppliers using
mysql/php/apache, but what i would like to do now is put a link for
each and every supplier and when someone clicks it, they will
automatically go to that supplier's list of products.

i want something like this:

SUPPLIERS TABLE
supplierID, Name, Address,

AA Alfin21 1506 w. 66th street <>EDIT<>

how do i accomplish this?
i would be pretty pleased if anyone can help me out here. THANX FOR
YOUR TIME IN ADVANCE :)


add a URL column that contains the url and when you display it on the
screen enclose it with <a href=$URL>$URL</a>.

Now, do want a link or do you want their page to load inside of yours?

Michael Austin.
Jul 17 '05 #2

P: n/a
I noticed that Message-ID:
<a4**************************@posting.google.com > from angel duran
contained the following:
i want something like this:

SUPPLIERS TABLE
supplierID, Name, Address,

AA Alfin21 1506 w. 66th street <>EDIT<>


Assuming you have a table containing the products, have a field in the
products table containing supplierID

I'll also assume you have another page with which you will display the
list of products called products.php.

When you list the suppliers include this bit
<a href="products.php<?php print "?supplierID=".$myrow['supplierID'];
?>EDIT</a>

then on the products page your SQL becomes

$sql="SELECT * FROM products WHERE supplierID=$_GET['supplierID']";

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.