Master/Details page
I am trying to build a master/details page:
master:
<?php require_once('Connections/mitoWebsiteMSQLI.php'); ?>
<?php require_once('webassist/mysqli/rsobj.php'); ?>
<?php
//query lists all database records?>
<?php
$masterAllRecordset1 = new WA_MySQLi_RS("masterAllRecordset1",$mitoWebsiteMSQLI,10);
$masterAllRecordset1->setQuery("SELECT * FROM completedProjects");
$masterAllRecordset1->execute();
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<ul>
<?php
while(!$masterAllRecordset1->atEnd()) {
?>
<li><a href="details1.php?bymission_id=<?php echo($masterAllRecordset1->getColumnVal("mission_id")); ?>"><?php echo($masterAllRecordset1->getColumnVal("project_name")); ?></a></li>
<?php
$masterAllRecordset1->moveNext();
}
$masterAllRecordset1->moveFirst(); //return RS to first record
?>
</ul>
</body>
</html>
Details:
<?php require_once('Connections/mitoWebsiteMSQLI.php'); ?>
<?php require_once('webassist/mysqli/rsobj.php'); ?>
<?php
$details1Recordset1 = new WA_MySQLi_RS("details1Recordset1",$mitoWebsiteMSQLI,1);
$details1Recordset1->setQuery("SELECT * FROM completedProjects WHERE mission_id = ?");
$details1Recordset1->bindParam("i", "".(isset($_GET['bymission_id'])?$_GET['bymission_id']:"") ."", "-1"); //colname
$details1Recordset1->execute();
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body
<?php echo($details1Recordset1->getColumnVal("project_name")); ?></body>
</html>
This is a simple Master/detail. I am having issues with the details page returning no value from the master page. It seems that the master page does go to the details page when the link is clicked, but no data is returned or printed to the page on the details page.
Please help me resolve this
Thank you.