slight newb question - how do I print variables (strings) as hyperlinks ?
I have a script which lists courses that members have signed up to and prints
them as a list:
Code: Select all
<?php $id = mysql_real_escape_string($id);
$id = eregi_replace("`", "", $id);
$query = sprintf("SELECT c.* FROM students_to_courses stc INNER JOIN courses c ON stc.course_fk = c.course_id WHERE stc.student_fk = '$id'");
$result = mysql_query($query);
while ($row = mysql_fetch_assoc($result)) {
$tutor = $row['tutor_fk'];
$course_name = $row['course_name'];
$course_descriptoin = $row['course_description'];
print '<span class="orangeText">' . $course_name . " ". "<br>" .'</span>';
} ?>

Question:
what do I need to add to the code to make each (orange) item in the list into a simple hyperlink ?
Best wishes
Monty