View Full Version : Comments
lilycup
02-16-2006, 08:34 PM
I'm creating a small website and I would like people to be able to comment on entries I put on the site.
Unfortunately I have no idea how to do this and I was wondering if anyone would be able to point me in the right direction of how I could do this.
If anyone could help me, that would be great! :)
CurtWRC
02-16-2006, 08:43 PM
I have just done a similar thing to this using ASP.NET (http://Curt.rallystuff.net). I used two tables called 'Blog' and 'Comments'. On the blog table I had the entries I had made myself. The ID of these are called 'BlogID'. I then created a page to add a comment. When a user filled out the forum and submitted it, the record was saved in the 'Comments' database. One of the fields in this table is called 'BlogID'. When a comment is added a BlogID is automatically added by using the query string addcomment?blogID=1 for example. Then I simply used a datagrid and opened the database using a WHERE clause like:
WHERE blogid =" & Request.QueryString("blogid")
This would then only display the comments for that entry.
If you haven't done much with databases before I would recommend starting with something a bit more easier than this to start off with. Unless anyone else knows an easier way :)
Pennimus
02-16-2006, 09:03 PM
You can always use flat files, that's what I did for a while. It's not ideal but if you don't fancy diving into databases it's workable.
Of course you still need some kind of server side script so if you don't already know a server side language you may just as well learn mysql as well and go straight for the database option, since that is what you will want to do eventually.
lilycup
02-18-2006, 03:51 PM
Thanks, I think I've figured it out now :)
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.