php and mysql site design question

Posted by Jacksta on Stack Overflow See other posts from Stack Overflow or by Jacksta
Published on 2010-06-12T10:11:08Z Indexed on 2010/06/12 10:12 UTC
Read the original article Hit count: 244

Filed under:
|
|

I am trying to build a website with mysql and php. This is the first site I have attempted so I want to write a little plan and get some feedback.

The site allows users to add some text in a text field as a “comment”. Once the comment has been entered into the site it is added to the database where it can be voted for by other users.

When a new comment has been added to the database it needs to create a new page, e.g. www.xxxxx.com/commentname or www.xxxxxx.com/?id=99981.

There will be a list of "Comments" in the database along with the number of votes for each comment.

The home page will have two functions.

1) Allow users to add a "comment"

2) Display two tables, each with 20 rows containing most "popular comments" and "recent comments"

Each comment will generate its one page where the comment will be displayed. Here users can read the comment and Vote for the comment if they wish.

Please help me out by explaining how to do the following.

-Generate a new page whenever a comment is added to the database

-Add a vote to the vote count in the comment database.

-Display the top 20 most popular comments as per number of votes.

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql