Ok, not interesting quesitons!
Hope some details would add some interests to it.
<?
if (isset($_POST[submit])) {
include 'db_connet.php';
if ($_POST[fid]!=0) {
$i = 0;
foreach($fid as $key => $value1){//here is my problem. How do I get the values ($value2) from another array $total[]?
$query2 = "insert into photo_order values ('', '$value1', '$value2', now())";
$query_db2 = mysql_query($query2) or die (mysql_error());
$i++;
}
}
}
?>
<form method=post action=post>
<table>
<tr><td><input type="checkbox" name="fid[]" value="1"></td><td><input type="text" name="total[]" size="1"></td></tr>
<tr><td><input type="checkbox" name="fid[]" value="2"></td><td><input type="text" name="total[]" size="1"></td></tr>
<tr><td><input type="checkbox" name="fid[]" value="3"></td><td><input type="text" name="total[]" size="1"></td></tr>
</table>
<input type="submit" name="submit" value="Send">
</form>