Hey every one. i am new in php. i know how to select, edit, add, delete data from database and show it in html table. before i was doing this using 4 php pages each for every one.

but today i got an assignment that i have to display data in html table and with every row there is a button of edit.
if user press edit same row of same table will convert to textbox with data in then and edit button will change to save button.

so i want to know how i can identify the row and change it in to textbox. i will really appreciate your help.

Recommended Answers

All 2 Replies

I would suggest using javascript to change the table cells into forms. To do it, you would probably give each cell a row number and column letter for the id= and the edit button (onclick) can trigger the javascript event.

I would suggest using javascript to change the table cells into forms. To do it, you would probably give each cell a row number and column letter for the id= and the edit button (onclick) can trigger the javascript event.

ok thanks for the concept, i will try now...
you have any example available??? i will get back to you after i will do my job

thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.