Hello there. I have looked to an answer for the following and I cannot find it in the knowledgebase. I suspect that this is probably because I am new to PHP, so please bear with me. I hope you can help.
I have two sections/tables. The first is called ‘issue’ and has one text field called ‘issuemonth’ into which a year and month are typed in the format ‘yyyymm’. This list viewer appears as I want it:
Issue - List Page Viewer
Issue for: 200806
Issue for: 200805
The second section/table is called ‘page’ and has two fields: a text field called ‘page_number’ into which a page number (001, 002, …) is typed, and ‘assign_issue’ which uses a picklist generated from the ‘issuemonth’ field in the ‘issue’ table. The list viewer page appears like this:
Page - List Page Viewer
Issue: 200806 - Page Number: 001 - Link: pageDetail.php?8
Issue: 200806 - Page Number: 002 - Link: pageDetail.php?6
Issue: 200805 - Page Number: 001 - Link: pageDetail.php?1
Issue: 200805 - Page Number: 002 - Link: pageDetail.php?2
What I am struggling to achieve is that I want to be able to click on a link in the Issue - List Page Viewer page and be sent to something that looked like the Page - List Page Viewer page, but only showing records that related to the ‘issuemonth’ that had been clicked.
Code – top of Issue - List Page Viewer:
list($issueRecords, $issueDetails) = getRecords(array(
'tableName' => 'issue',
));
Code – body of Issue - List Page Viewer:
<?php foreach ($issueRecords as $issueRecord): ?>
Issue for: <a href="<?php echo $issueRecord['_link'] ?>"><?php echo $issueRecord['issuemonth'] ?></a>
<hr/>
<?php endforeach; ?>
Code – top of Page - List Page Viewer:
list($pageRecords, $pageDetails) = getRecords(array(
'tableName' => 'page',
));
Code – body of Page - List Page Viewer:
<?php foreach ($pageRecords as $pageRecord): ?>
Issue: <?php echo $pageRecord['assign_issue'] ?> - Page Number: <?php echo $pageRecord['page_number'] ?> - Link: <a href="<?php echo $pageRecord['_link'] ?>"><?php echo $pageRecord['_link'] ?></a>
Thanks for any assistance in advance, George