Hi,
Im looking to create my own simple forum, in which people can post threads and have replies.
To simplify it basically, Im intending to have just 2 tables in MySQL. One holding the subjects of the thread; and the second holding the thread contents and replies.
For example:
Thread Header table:
Thread ID (PK)
Subject
Author
Date
Thread Reply table:
Reply ID (PK)
Content
Author
Thread ID
The main page will show all the header records, and by clicking on the subject field will take the user to the thread replies...which will be shown in ascending order of reply ID.
I have the main page showing the thread titles, coding as follows:
//Create a table, with column headers as follows:
echo('<table>');
echo('<tr>');
echo('<td>Message Subject</td>');
echo('<td>Author</td>');
echo('<td>Date of creation</td>');
echo('</tr>');
//Create a new row for each match
while($row=mysql_fetch_array($q)) {
echo('<tr>');
echo('<td ><A HREF=thread.php>'. $row["subject"] .'</A></td>');
echo('<td>'. $row["author"] .'</td>');
echo('<td>'. $row["date"] .'</td>');
echo('</tr>');
I am stuck on the link to the thread.php file though, as I am unsure how to specify which thread to go to.....hope this makes some kind of sense
Any help gratefully received