What is the best way to update a specific record in MySQL using ajax? I have a record appear on a web page and I want to allow someone to update it. My greatest difficulty is how do I ensure that the id of the mysql record appearing on the page is the one that is updated. Basically, I want to sent the id to the webpage and have that id sent back using ajax to the php script so that the php script updates the correct record in the database. What I am thinking is that I should send the id, place it on the page and use something like getElementByID to get the ID, place the result in the onclick javascript function and send to the PHP script. Am I on the right track or better yet is there a simple way to do this perhaps using a framework?

A thousand thanks to all those who reply,