ngreenwood6 Posted September 3, 2008 Share Posted September 3, 2008 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 More sharing options...
alin19 Posted September 3, 2008 Share Posted September 3, 2008 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 More sharing options...
ngreenwood6 Posted September 3, 2008 Author Share Posted September 3, 2008 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 More sharing options...
ngreenwood6 Posted September 3, 2008 Author Share Posted September 3, 2008 Really need some help with this if anyone cares to help. I just want to be able to submit some data and then edit it on another page if logged in as admin. I know that someone has to know how to do it. Link to comment https://forums.phpfreaks.com/topic/122529-editing-data/#findComment-632690 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.