What i'm trying to do is to use a variable to create a hyperlink, essentially I'm using a search form which returns a list of records with limited fields, i want to have a link for each record to show the full record for that person.
the code i'm trying to use is
<?php
include( 'dbinfo.php' );
$conn = mysql_connect( $dbhost, $dbuser, $dbpass );
mysql_select_db($dbname);
$sql = "SELECT * FROM Info where surname like '%$searchsurname%' AND firstname like
'%$searchfirstname%' AND department like '%$searchdepartment%'";
$InfoResult = mysql_query( $sql ) or die( mysql_error() );
while ( $InfoRow = mysql_fetch_row( $InfoResult ) ) {
echo '<tr><td>' . $InfoRow[3] . '</td><td>' . $InfoRow[2] . '</td><td>' . $InfoRow[4] .
'</td><td>' . $InfoRow[5] . '</td><td>' . $InfoRow[1] . '</td><td><a href="fullrecord.php?=id' . $Inforow[0] .
'">More Info</a></td></tr>';
echo $InfoRow[0];
}
mysql_close ($conn);
?>
everything works OK, the link is formed, however where the variable should be (it is actually their ID number) there is nothing.
where there is the echo $InfoRow[0] ; command, this DOES display a value!
Thanks
(i hope this makes sense)