<?php
// global header/footer
function template_header($title) {
echo '<!DOCTYPE html><html lang="en"><head><meta charset="utf-8">
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1">
<link rel="stylesheet" href="screen.css" media="screen,projection,tv">
<title>', $title, '</title>
</head><body>';
} // template_header
function template_footer() {
echo '
<script src="formSelect.js" async></script>
</body></html>';
} // template_footer
// template functions unique to this test
function template_updateRowsHeader() {
echo '
<form id="updateRows" method="post" action="">
<table>
<caption>Update multiple rows in mysql with checkbox</caption>
<thead>
<tr>
<th scope="col"><input type="checkbox" data-checkAll="checkTargets" title="Select or Deselct ALL"></th>
<th scope="col">Id</th>
<th scope="col">Firstname</th>
<th scope="col">Lastname</th>
<th scope="col">Email</th>
</tr>
</thead><tbody id="checkTargets">
';
} // template_updateRowsHeader
function template_updateRowsData($row) {
echo '<tr>
<td><input type="checkbox" name="checkbox[]" value="', $row['subscriptionsid'], '"></td>
<td>', $row['subscriptionsid'], '</td>
<td>', $row['firstname'], '</td>
<td>', $row['lastname'], '</td>
<td>', $row['email'], '</td>
</tr>';
}
function template_updateRowsFooter() {
echo '
</tbody>
</table>
</form>';
} // template_updateRowsFooter