KevHopwood Posted October 20, 2013 Share Posted October 20, 2013 Hi people. I'm creating a website that runs on php and mysql. I have a list page which grabs all the info on mysql and displays the content. once clicking on one of these it brings up a single page which lists more info on that specific item. what I want is to add a comments field(feedback / review or what ever you may wish to call it) underneath the info on the single page. The commenter does not need to be logged in but maybe use there facebook Id or something to stop spammers clogging up the page. what is the best way to do this? Will it be using another mysql field called review? or is there some other way of doing this? please can someone point me in the right direction for a tutorial (youtube preferably)? thanks for your help. Kev. Quote Link to comment https://forums.phpfreaks.com/topic/283112-comments-box-at-the-end-of-each-page/ Share on other sites More sharing options...
KevHopwood Posted October 21, 2013 Author Share Posted October 21, 2013 So over 700 views and not 1 reply? Quote Link to comment https://forums.phpfreaks.com/topic/283112-comments-box-at-the-end-of-each-page/#findComment-1454723 Share on other sites More sharing options...
Ch0cu3r Posted October 21, 2013 Share Posted October 21, 2013 What have you tried so far? basically you store all comments in the database. When adding the comment to the database save your pages id with it, eg INSERT INTO comments SET page_id = $page_id, posters_name = '$posters_name', comment = '$comment' When you display your page and want to show the comments for that page. You'd run this query SELECT posters_name, comment FROM comments WHERE page_id = $page_id To protect from spam you can add something like ReCapture to verify the person that is submitting the comment is a human and not some spambot. If you only want members signed into facebook to be able to post a comment you'll have to look into using the facebooks api Quote Link to comment https://forums.phpfreaks.com/topic/283112-comments-box-at-the-end-of-each-page/#findComment-1454725 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.