How to hyperlink one field from the results of a php query
I have a query that is working. It places the data results in a table and looks great. The problem is I'm trying to hyperlink the results so the user can click on the correct data and the second phase of the operation can begin.
Here is a section of the print of the variables:
if ($results) { //this will check if the query failed or not
if (mysql_num_rows($results) > 0) { //this will check if results were returned
while($copy = mysql_fetch_array($results)) {
$variable1=$copy['1Num'];
$variable2=$copy['2Num'];
$variable3=$copy['3Num'];
//table layout for results
print ("<tr>");
print ("<td>$variable1</td>");
print ("<td>$variable2</td>");
print ("<td>$variable3</td>");
print ("</tr>"); }
I need to hyperlink only 1Num, so I tried the follow to no avail:
print ("<td><a href="2step.html">$variable1</td>");
I tried what I knew and it failed. I cannot find any data on this operation, so I hope it is possible.
|