Im trying to generate a list of names linked to another page where their information will be displayed.
my problem is in adding in the <a href="view.cfm?id=id"> with the current output. how do I integrate the list with the html which seems to be interfering
here is my code:
<?php
$user = "name";
$pass = "password";
$db = "database_name";
$link = mysql_connect("localhost", $user, $pass );
if ( ! $link)
die("Cant connect");
mysql_select_db ($db, $link)
OR DIE ("couldnt open $db: ".mysql_error() );
$result = mysql_query("SELECT ID,
strFirstName,
strLastName
FROM tblStudents
ORDER BY strLastName");
WHILE ( $a_row = mysql_fetch_object($result))
{
print "$a_row->strLastName, $a_row->strFirstName<br><br>\n";
}
?>