Final
To solve this problem I am going to:
1. Add a comments view to my post.php page.
2. Add a comments table to my database, as described below.
3. Fetch the comments for every page.
4. If logged in, show comment form.
5. Create comment submission logic.
Database table: comment
| Field Name | Data Type | Attributes |
|---|---|---|
| comment_id | INTEGER | AUTO_IMCREMENT NOT NULL PRIMARY KEY |
| comment_title | VARCHAR(50) | NOT NULL |
| comment_author | VARCHAR(50) | NOT NULL |
| comment_text | VARCHAR(2000) | NOT NULL |
| comment_date | DATE | NOT NULL |
| post_id | INTEGER | NOT NULL FOREIGN KEY |