---- HTML Form ----
<?php
$query = mysql_query("SELECT * FROM package WHERE status = 0");
while($row = mysql_fetch_array($query)){
$package_id = $row['id'];
$package_name = $row['name'];
?>
<tr>
<td><?php echo $package_name; ?></td>
<td><input type="text" name="txt[]" id="quantity" placeholder="0">
--------- Aboue input is for quantity of those products----------
</td>
</tr>
<?php
}
?>
Here is the code for process.php for this form POST method
//
<?php
if(isset($_POST['submit'])){
$alTxt= $_POST['txt'];
$N = count($alTxt);
for($i=0; $i < $N; $i++){
echo($alTxt[$i]);
}
}
?>
Now the output of process.php is 125 (If i put the input in 3 textbox like 1,2,3) Now the problem i got the quantity of the product , but how can i get the each product id or product name along with the quantity ? So i can get the calculation in process.php ? Can anyone help me with the codes ??