Click to See Complete Forum and Search --> : how to create a link to a record from a table


Ammj
07-01-2005, 08:37 AM
Help: I am trying to create a table which has built in links to display any record that a user selects. IE: a table has a list if records from 1 to 10 each with 5 fields. If a user clicks on the record number 5 i would like to display just that record. My mind has done a blank and would like some pointers.

Thanks

bradgrafelman
07-01-2005, 10:37 AM
Erm, this is the feedback forum, for discussion about the PHPBuilder site itself and whatnot. You're probably looking for the Database (http://www.phpbuilder.com/board/forumdisplay.php?s=&forumid=6) forum!

Perhaps a mod might see this and move it for you. In the meantime, here's a possible solution:

Add an 'id' column, and make it UNIQUE. This way, when you echo out the HTML, you can use links such as "rowID=3" and whatnot, so that when they click on it, you add "WHERE rowID=$rowID" on to your SQL statement.

If you don't get what I mean, let me know, and I'll try to describe this solution in greater detail.

Ammj
07-01-2005, 11:01 AM
Thanks for the hint, I see where you are going, I was working on the lines of using a check box array, then checking which checkbox was ticked.
Then use checkbox number to load the record.

I think I can do it now, thanks.
PS will delete thread/posts anyway to stop confusion!