I want to write a "delete" button in php. So far I have echoed out the form needed with a delete button for every row of data. But now I'm trying to make the delete button work so that whenever you press the delete button it only deletes that individual row of data.
Please help me. I am a beginner at this. Thanks.
echo '<form>'; echo "<tr> <th>Contact Person</th> <th>E-mail / MSN address</th> <th>Mobile</th> <th>Direct Line</th> <th>Fax</th> <th>Delete</th> </tr>"; while($duty = mysql_fetch_array($result)){ echo '<tr><td>'; echo $duty[3].'</td>'; echo '<td><input id='.email.' value='.$duty[4].'></td>'; echo '<td>'.$duty[5].'</td>'; echo '<td>'.$duty[6].'</td>'; echo '<td>'.$duty[7].'</td>'; echo '<td>'.'<input type='.submit.'value='.Delete.'>'.'</td></tr>'; echo '</form></tr>';
This is what I have at the moment. Please tell me how to write this. Thank you.