开发者

creating a table in php which has edit functionality

I have a table which displays the values from a MySQL table. I need to add edit functionality to it using PHP. I have an input form which posts data to the table usin开发者_JAVA百科g $_GET['term']. How can i add the edit link to each record in the table so that it will redirect to the input form with the values populated?

I think we can use $_GET method here but am not sure how. Any ideas?


Add an edit link like this:

<a href="/path/to/input-form.php?id=<?php echo $row['ID']; ?>">edit</a>

where id is the id of the database entry.

This will take you to the form, and you can use a mysql call to populate the fields based on the id passed using $_GET['id']

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜