Page 1 of 1

'Basic' Message Board Reply

Posted: Wed Apr 13, 2011 2:09 am
by Junglejim
I am in the process of creating a very simplistic message board system and im completely lost as to how to create a reply method for it(3 weeks running round in circles :banghead: ).

There is one sql database for it (using phpmyadmin) consisting of a table - 'threads'.

threads
id - primary key, auto incrementing
comment_title
comment
author
time

the time of the post goes into 'time' the author of the post goes into author, a user submitted message goes into comment and the messae title goes into 'comment_title'.

next the data is shown on a form(the message titles as a link to another form displaying the message).

Heres where im stuck, i cant figure out to make a reply to the message that is posted. I thought about using the primary key 'id' in the threads table somehow to link the reply message to a specific post but im completely unsure how to go about this (each post has a unique id number).

Im fairly new to sql and php.
Any help or suggestions would be greatly appreciated.

Re: 'Basic' Message Board Reply

Posted: Wed Apr 13, 2011 3:42 am
by zyntrax
http://www.phpbb.com/downloads/

This is what i would recommend, alot easier.

Re: 'Basic' Message Board Reply

Posted: Wed Apr 13, 2011 12:45 pm
by social_experiment
Junglejim wrote:I thought about using the primary key 'id' in the threads table somehow to link the reply message to a specific post
You're on the right track, this 'primary key' (which will now become a foreign key) is used to tie the replies to the original message. You can put the 'id' value (hereafter messageID) as a hidden field, or maybe a session variable, depending on your script.