I have a combo box. When I select a value from combobox, it prints some results below. I have a link to delete every single results. So when I click ‘Delete’ link, the particular result should be deleted. I am using jquery to delete process. What I really want is, the results are generated dynamically, so every single delete link will have particular id values. I wanna know how can I get the particular result to delete when I click particular ‘Delete’ link as every result will have a unique id. how can i get it from jquery.
PHP Code:
<?php
include("db.php");
$make_id = $_GET['make_id'];
$sql = mysql_query("select model_id, model from models where make_ID = $make_id");
while ($row = mysql_fetch_array($sql)) {
echo "<tr>";
echo "<td id='" . $row['model_id'] . "' class='model_id_class' width='200'>" . $row['model'] . "</td>";
echo "<td width='50'>" . "<a href='delete_model.php' id='delete_class'>" . "Delete" . "</a>" . "</td>";
echo "</tr>";
}
?>
Based on the code in your comment your output might be something like this:
Since it’s all in the same tr: