select primary key from HTML table?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mozartpena
Forum Newbie
Posts: 1
Joined: Thu Apr 24, 2008 1:19 am

select primary key from HTML table?

Post by mozartpena »

I have an HTML table which contains a summary of leave requests from employees.

The table contains 5 columns: Request ID, Date Requested, Employee Name, Leave Type, and a "View Entry" button after each row. When "View Entry" is clicked it should display the complete request. This comprehensive report NEEDS Request ID as the primary key to be able to display all the data needed in a popup window.

so is it possible to retrieve request ID from a specified cell (in this case, the first column for request ID). or is there some ingenious array method to be able to extract request ID?

i have had troubles with this for the past days. im turning to you guys for help.
thanks in advance!
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Re: select primary key from HTML table?

Post by Kieran Huggins »

I'd suggest using jQuery (which is not uncommon for me)

you'd find the row, then the first TD element and get it's contents.

http://jquery.com
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: select primary key from HTML table?

Post by aceconcepts »

How is your data populated?
Post Reply