if you use database to store the massages and you use the mysql
create a table table1"to store the first massage.
create TABLE table1 (id INT NOT NULL AUTO_INCREMENT,
massage text,
........
PRIMARY KEY (id);
if someone posts a massage,the massage get an id unique-----AUTO_INCREMENT;
now, create the second table
create TABLE table2 (id INT NOT NULL AUTO_INCREMENT,
reply_massage text,
reply_who,
........
PRIMARY KEY (id);
ok,use table2 to store the reply massages.the field reply_who stand for the id in table1;
now,let's see how to display the massage and it's replies:
$query1="select massage,id from table1 where id='id';
$result1=@msyql_query($query1,$connect_id);
if ($result)
{
$query2="select massage from table2 where table1.id=table2.reply_who";
$result2=@($query,$connect_id);
if($result2)
{
while(list(massage)=@mysql_fetch_array($result2)
{cho $massage."<br>";
............}
}
else
{
echo "sorry,there is no reply to.....";
}
else
{
echo "sorry,the massage may be deleted";
}
of course you can use two tables to store,but it is not recommended.
if you use paradox to store:
you need only to replace the fonuctions.
:-)
yours
shakespeare