Peyo Posted July 6, 2010 Share Posted July 6, 2010 Hello, Im pretty new to this... I'm working on a directory listing site. Learning as I go... Basically, each client will get their own page to promote their goods and/or services. Some clients want to give their customers a chance to write a review and some dont want this option. I'd like to setup a page where people can write a review on a vendor's site. I'd like it to be pretty simple... Name and comment... Perhaps include a rating systems from 1-5 stars... I'd like to also include the date they have written their review. Maybe a way to prevent people from spamming reviews would be nice too... to help reduce the junk and time to clean... Im clueless on how to do this.. Help PLS Thanks Link to comment https://forums.phpfreaks.com/topic/206872-help-with-a-review-page-pls/ Share on other sites More sharing options...
jd307 Posted July 6, 2010 Share Posted July 6, 2010 Hi there Peyo. Unfortunately this forum is for help with code you have already written, therefore we will not write code for you. However, we can give you some tips on where to start and where to look. What you are really needing is a basic database that stores: name, comment, rating and date. All you will need is a standard HTML form on a page (for argument sake, call it 'comment.htm'). This will allow people to select their rating, add comments, etc. When they click submit, have the data sent to 'addComment.php' (again just for example on the name of the page). This page will need to have: - A connection to the database - Variables to grab the data (e.g. $name = $_POST['name'];, etc.) - You can use PHP to get the current date / time (so this doesn't need to be on the form) - An SQL 'INSERT' query to add the information to the database To stop spamming, you could look into the CAPTCHA method (you have probably seen it where you get squiggly numbers and letters and have to type them into a box to verify you are a human, or clever monkey). The official site with instructions, etc. can be found at http://www.captcha.net/. All of these are fairly simple and basics of PHP and MySQL. I would suggest reading up on some of the basic PHP fucntions and tutorials. One of the best places you can learn from (or the very basics, IMHO) is a website called Tizag. If you write some code to produce what you want, you can always post it here (use the and [code] tags to post you code) and we can help you find out what is going wrong. Good luck! If you find it tough going at first, don't get disheartened... once you push through and get used to the scripting you'll improve fairly quickly. Link to comment https://forums.phpfreaks.com/topic/206872-help-with-a-review-page-pls/#findComment-1081833 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.