How to pass column data through form button?
Posted: Wed Feb 11, 2004 12:19 pm
Sorry for the possibly confusing subject, here's what I'm trying to do. I've made a form that uses this while loop to go through each row in a mysql table and displays the data in a table.
As you can see, each row has it's own Delete button (using Submit to go to delete.php). What I am trying to figure out, is how to send the ID(custNo in my example) that the row that the clicked Delete button is on to delete.php so I can display that row data and confirm the delete.
Thanks in advance for any help.
Code: Select all
while($row=mysql_fetch_array($query))
{
echo "
<td>$rowїcustNo]</td>
<td>$rowїfName]</td>
<td>$rowїlName]</td>
<td>$rowїaddress]</td>
<td>$rowїcity]</td>
<td>$rowїstate]</td>
<td>$rowїzip]</td>
<td>$rowїphone]</td>
<td><FORM METHOD='post' ACTION='delete.php'>
<INPUT TYPE='SUBMIT' VALUE='Delete'></FORM></td>
</tr>";
}Thanks in advance for any help.