Jump to content

posting


Caligo

Recommended Posts

Probably already discussed, but I dont know what to search for.I want to have a form so that a person can leave comments, like facebook or deviantart. Or something so that they can comment and say what they think should be changed on the site or if something should be added, stuff like that. What would I do and how?I am not sure if it should be done in asp or what language.

Link to comment
Share on other sites

An email component isn't necessary, assuming you don't want to send email. If all you want to do is have a comments page for people to post comments, you need to setup a database table to hold the comments. The simplest way is to let anyone post without requiring a user account, if you want to require user accounts then the database and code will be a little more complex. But you really only need a single table with fields like this:id; integer; autonumber/identitypost_date; integerauthor; varchar, 100 characterssubject; varchar, 100 charactersbody; textAnd then you have fields on your comments page for the author's name, subject, and body. When you insert it in the database, you grab a timestamp and use that for the post date, insert the values from the form, and the ID will be automatically set. When you display posts, you can just order them by post_date or by ID, and convert the post date from an integer timestamp to a readable date/time value. If you want people to leave comments on more than one page, you will need another database field to indicate which page the post belongs on.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...