Ok, I'm having some major issues with multiple session variables. I'm extremely new to sessions, so I'm blaming it all on that :-P
I have a form that is generated from a database:
<? while ($row = mysql_fetch_array($result)){ ?>
<tr>
<td><input type="text" name="lots[]" size="13" maxlength="12" value=""></td>
<td><input type="checkbox" name="tanks[]" value="<? echo("$row[serial]"); ?>"></td>
</tr>
<? } ?>
That's basically what I'm working with. The particular lot and serial must always be associated with one another and there could be an infinite number of each being passed to the next page.
My problem? I have absolutely no idea how to do this. I can handle the serial fine with:
<?
$howmany = count($_SESSION['tanks']);
if ($howmany > 0){
foreach($_SESSION['tanks'] as $serial => $tank){
//Whatever
}
}
?>
But I have absolutely no idea what to do about the lots. I even ignored the serial bit altogether in an attempt to get the lots to transfer by replacing "tanks" with "lots" in the second code fragment, but no luck.
I realize my explanation may be confusing, so please let me know if I need to clarify anything.
Right now I just want to be able to take the inputs from page one (with the form) and display them on page two.
OR, hell, if you know of a better way to do this without even using sessions, by all means, let me know! 😃
HELP!