Forum Moderators: coopster
This is my php code from directory.php, it works fine. I get a list of Names as a link and I am able to click and get to the page www......org/profile.php?id=num for each link
/RETRIEVE DATA
$query = "SELECT * FROM `registration` ORDER BY `Lname`, `Fname`";
$result = mysql_query( $query ) or die( "Trouble getting information from the database: " . mysql_error() );
while( $myrow = mysql_fetch_array( $result ) )
{
// Display the List of Alumni sorted by Last Name
$id = $myrow["id"];
$Lname = $myrow["Lname"];
$Fname = $myrow[Fname];
$mInitial = $myrow[mInital];
echo("<a href= \"profile.php?id=".$myrow[id]."\"> $Lname, $Fname $mInitial.<br></a>");
}
?>
My second file profile.php ( it must be the source of the problem):
$result = mysql_query("SELECT * FROM registration WHERE $id=id");
$myrow = mysql_fetch_array($result);
echo "First Name: ".$myrow['Fname'];
echo "<br>Last Name: ".$myrow['Lname'];
echo "<br>Title : ".$myrow["title"];
echo "<br>Email : ".$myrow["email"];
echo "<br>Address: ".$myrow["address"];
all the labels are displayed , but the data itself, is nothing. I am a new bie, i have being on this the whole day...I will appreciate any help.
Thanks