Hi, I have queried my database to find relevant conditions, and these conditions are listed on a web page as necessary. I have used the following code to do this:
$cond_query = "select c.Condition
from Conditions c, Temp t
where c.Condition_no = t.Condition
group by c.Condition_no
order by c.Condition";
$cond_result = mysql_query($cond_query);
$num_results = mysql_num_rows($cond_result);
for ($i=0; $i <$num_results; $i++)
{
$row = mysql_fetch_array($cond_result);
echo "<divalign='left'><p><strong>".($i+1).". </strong>";
echo htmlspecialchars (stripslashes($row["Condition"]));
echo "</p><div>";
}
The trouble I have now is that I need every condition that is echoed to have a link to a page called description.php, where a description will be displayed relevant to the condition selected. The sql statement to get the description is:
$desc_query = "select Description
from Conditions
where Description =
selected link";
What do I need to do to create these links and to complete the sql statement to echo the appropriate condition description.
Please help!!
Thanks, Sarah