Jump to content

editing data


ngreenwood6

Recommended Posts

I am in need of some help. I have created a page where a user can submit a comment. I would like to be able to edit or delete these comments as I feel necessary. I want to edit or delete buttons to show up only if I am logged in as admin. The comment gets entered into the database with the username, date, comment, and id. Could someone please let me know how to do this.

Link to comment
https://forums.phpfreaks.com/topic/122529-editing-data/
Share on other sites

you can make a sql table where to be inserted those coments by

 

username date comment id aproved(yes/no)  viewed(yes/no)

 

 

and make a page that only admin can see where a sql query: select * from coments where viewed='no', and then have two butons, aprove and reject, onclik to update sql table

 

Link to comment
https://forums.phpfreaks.com/topic/122529-editing-data/#findComment-632639
Share on other sites

Thanks for the help. I have already created the page. Can you tell me how to do the onclick thing because I am not sure of how that works. Also, how would I know which one I am editing and be able to edit it. I can show the all of the posts that have not been viewed but I cannot edit it.

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/122529-editing-data/#findComment-632654
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.