Hi, I have created a web application that enables to Delete Items in a product table using check boxes.
I Need to Display each and every product in <TR> and with the product there is a corresponding check box to delete it, use can select the check box and then he will press the Update Button in the Form to submit for processing.
[PHP]
//Here I will get the Values from MySQL Table
//This Area is Inside a HTML form with Update button and On Submit it will pass //to PHP page for precessing.
while($row = mysql_fetch_ass oc($result))
{
echo '<tr>
<td>'.$row['p_name'].'</td><td>
<input type="checkbox" name="pid" value="'.$row['p_id'].'" /><td>
</tr>';
}
[/PHP]
But the problem is here in my coding as the checkbox name I am giving the name as pid.
Since i have put it inside while loop for 5 products there will be 5 check boxes.
Then name will create duplicates.
So then I cant get this Value from PHP side. Only one of the check box value will come to PHP page.
So How do i send all the selected check box values when user Submit the Form.
I Need to Display each and every product in <TR> and with the product there is a corresponding check box to delete it, use can select the check box and then he will press the Update Button in the Form to submit for processing.
[PHP]
//Here I will get the Values from MySQL Table
//This Area is Inside a HTML form with Update button and On Submit it will pass //to PHP page for precessing.
while($row = mysql_fetch_ass oc($result))
{
echo '<tr>
<td>'.$row['p_name'].'</td><td>
<input type="checkbox" name="pid" value="'.$row['p_id'].'" /><td>
</tr>';
}
[/PHP]
But the problem is here in my coding as the checkbox name I am giving the name as pid.
Since i have put it inside while loop for 5 products there will be 5 check boxes.
Then name will create duplicates.
So then I cant get this Value from PHP side. Only one of the check box value will come to PHP page.
So How do i send all the selected check box values when user Submit the Form.
Comment