Ok, I'm having a really tough time getting this to work the way I want.
Page One
[PHP]
<? while ($row = mysql_fetch_arr ay($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>
<? } ?>
[/PHP]
Page Two
[PHP]
<?
$howmany = count($_POST['tanks']);
if ($howmany > 0){
foreach($_POST['tanks'] as $serial => $tank){
//Whatever
}
}
?>
[/PHP]
Yay, page two works fine.
BUT, What I really want to do is Make it so that I can make an SQL query with both the lot and serial on page two.
Such as $query = SELECT * FROM 'whatever' WHERE lot = lots[] and tank = tanks[]
And, I have absolutely no idea how to go about doing this.
Does that make much sense? Please let me know if I need to clarify anything. I'm really confused and very new to this.
Page One
[PHP]
<? while ($row = mysql_fetch_arr ay($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>
<? } ?>
[/PHP]
Page Two
[PHP]
<?
$howmany = count($_POST['tanks']);
if ($howmany > 0){
foreach($_POST['tanks'] as $serial => $tank){
//Whatever
}
}
?>
[/PHP]
Yay, page two works fine.
BUT, What I really want to do is Make it so that I can make an SQL query with both the lot and serial on page two.
Such as $query = SELECT * FROM 'whatever' WHERE lot = lots[] and tank = tanks[]
And, I have absolutely no idea how to go about doing this.
Does that make much sense? Please let me know if I need to clarify anything. I'm really confused and very new to this.
Comment