I have seen examples and I have an idea of how to solve it, but the name on my checkbox I use uses concatenation. Because of this I do not know how to post the data on a new page using a name. I tried several ways and nothing so far. I need the data to posted on saveGames.php and I was then going to use a function to parse through the data and select the ones only with $id and checked (Example: "43checked")
UpcomingGames.php
<form name="saveGames" action="saveGames.php" method="post">
//Code
</form>
/*PHP function for setting up checkboxes for many different rows. I set up the name as $id which is the gameId and I added checkbox next to it so later I can parse through the data and select the ones with checked as the value because those games were selected. */
function checkbox($params)
{
echo "<td>";
$id = $params["gameID"];
echo "<input id=\"$id\" type=\"checkbox\" name='". $id ."checkbox'>";
echo "</td>";
}
Trying to post on this page saveGames.php
<?php include('header.php'); ?>
<?php
require_once('dbBaseDao.php');
require_once('dbUserDao.php');
require_once('dbBotDao.php');
$userDao = new dbUserDao();
$botDao = new dbBotDao();
$ChosenGame = $_POST["'. $id 'checked"];
echo $ChosenGame;
?>