Calling values from a hyperlink and querying mysql?
Posted: Sun Nov 02, 2003 1:15 pm
Hello, I have a nice question for the forum leaders
, so here goes:
Let's say you have 4 hyperlinks on your page :
Bob
Joe
Smithers
Lisa
Now, each of these links are values in my mysql database under the header value "Names".
What I want to do, is when I click on the hyperlink Bob, i want to be able to query mysql looking for bob and then posting the info that is with him in his row on a new page.
The thing is, bob is not a static name on the page. bob could be jon tomorrow, so the links are dynamic in other words ( they will change ).
the only idea i could come up wtih is setting each link to be directed to a php page ( call it query.php ), and inside that page it will read the link you clicked on, and query the database from there... however, since i'm a newb to this, i have no idea how to go about doing it...
if someone could give me some insight on this, it would be greatly appreciated.. Thanks
Let's say you have 4 hyperlinks on your page :
Bob
Joe
Smithers
Lisa
Now, each of these links are values in my mysql database under the header value "Names".
What I want to do, is when I click on the hyperlink Bob, i want to be able to query mysql looking for bob and then posting the info that is with him in his row on a new page.
The thing is, bob is not a static name on the page. bob could be jon tomorrow, so the links are dynamic in other words ( they will change ).
the only idea i could come up wtih is setting each link to be directed to a php page ( call it query.php ), and inside that page it will read the link you clicked on, and query the database from there... however, since i'm a newb to this, i have no idea how to go about doing it...
if someone could give me some insight on this, it would be greatly appreciated.. Thanks