Jump to content

[SOLVED] Make hyperlink in dynamic listing


oceans

Recommended Posts

You are still using invalid HTML, this is why its not parsing the <a href> link.

The proper way to do this is

 


while($row = mysql_fetch_assoc($result))
	{
		 echo "<td class='FieldName'><a href=\"/MyPHP/Service/ST/NewPage.php?start=".$row['Number']."\">".$row['Number']."</a></td>";
		 echo "<td class=FieldName>".$row['STID']."</td>";
		 echo "<td class=FieldName>".$row['Name']."</td>";
		 echo "<td class=FieldName>".$row['Address']."</td>";
		 echo "</tr>";
	}
	echo "</table>";

 

Basically I changed:

 

echo "<td class='FieldName'><a href='/MyPHP/Service/ST/NewPage.php?start=".$row['Number'].">".$row['Number']."[/url]</td>";

 

To

 

echo "<td class='FieldName'><a href=\"/MyPHP/Service/ST/NewPage.php?start=".$row['Number']."\">".$row['Number']."</a></td>";

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.