467,104 Members | 1,021 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,104 developers. It's quick & easy.

help identifying the clicked record

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
  • viewed: 1336
Share:
2 Replies
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
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.

Similar topics

9 posts views Thread by Mark | last post: by
4 posts views Thread by P.D.N. Tame | last post: by
4 posts views Thread by Armando | last post: by
17 posts views Thread by Timothy.Rybak@gmail.com | last post: by
15 posts views Thread by Jay | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.