I'm just starting out with PHP. I'm trying to be able to select a single record from the entire list of records and then diplay that record detail for viewing/editing etc.
I'm able to pass the primary key variable through a link and go to the detail page, but no data is visible?
The id variable is passed on through the url fine.
displaydetail.php:
<?
$connection = mysql_connect("host","user","password")
or die ("Couldn't connect to server.");
$db = mysql_select_db("waitinglist", $connection) or die("Couldn't select database.");
$result=mysql_query("SELECT * FROM applicants WHERE applicantid='applicantid'");
while($row = mysql_fetch_array($result)){
$applicantid = $row["applicantid"];
$name = $row["name"];
$sex = $row["sex"];
$birth = $row["birth"];
$contact = $row["contact"];
$dayphone = $row["dayphone"];
$eveningphone = $row["eveningphone"];
echo "$applicantid";
echo "$name";
echo "$sex";
echo "$birth";
echo "$contact";
echo "$dayphone";
echo "$eveningphone";
}
?>
I'm sure i'm missing something obvious?
Brian