Best way to display mysql data that can be used to update mysql data

Hi guys

I want to know the best way of displaying records in a web page that can easily be updated or deleted. My thoughts have been displaying records in rows that can be clicked on (like hyperlinks), which then create a popup that lets you select whether to delete the record or update it. If you select update, this opens a window with the record information so you can update a field.

My other thought is a button or two (separating the delete and update functions) next to each record that removes the extra step required above.

Any suggestions

Thanks for your help.

I generally go for the records listed then put the functions on icons to the right, delete, modify etc.

Dont forget to code in an ‘are you sure’ check on the delete function.

How would you include the ‘are you sure’ check??

At the moment, i have two anchor links to the side of each record; 1 for update and 1 for delete. Both links include id variables of their associated record, which when clicked used another page to perform their functions.

So for delete, click the link, stockdelete.php is called where i will have a query to delete the record in association with the carried ‘id’.

Where would the check be? On the anchor link or in the stockdelete.php page?

Thanks

you could use the onclick in the anchor tag. then use a javascript popup to confirm.