I currently have the PHP query results displayed in a table, along with a checkbox for each of the entries, but for some reason, the submit button that is part of the form isn't displayed when I view the page in a browser, so I can't click it to check that it works.
The code for my form is below:
Code: Select all
<form action="shoppingBasket.php" method="post">
<?php
// print out the data stored in the $gameTitleQueryResult variable in a table
// put the table inside a php form, so that user can add games to shoppingBasket
echo '<div id="Games">';
echo '<table id="Games" border="1">';
while ($a=pg_fetch_row($gameTitlesQueryResult)){
echo '<tr>';
for ($i=0; $i<pg_num_fields($gameTitlesQueryResult); $i++){
echo '<td>'.htmlspecialchars($a[$i], ENT_QUOTES).'</ td>';
}
echo "<td><input type='checkbox' name='selectGame[]' value='{$a['refnumber']}' /></ td>
</ tr>";
}
echo '</table></ div>';
?>
<input type="submit" value="submit"/>
</form>