"; echo "Questions and Answers "; //with a while loop //this loop will iterate as long as there are records while ($row = mysql_fetch_array($result)) { $date = $row["the_date"]; $name = $row["name"]; $topic = $row["topic"]; $question = $row["comments"]; $answered = $row["Answered_by"]; $answer = $row["answer"]; echo "
*****************************************************************
Asked on: $date

Asked By: $name

Topic of the Question: $topic

Question:
$question

Answered by: $answered

Answer:
$answer "; } mysql_close(); ?>