echo 'Delete' is not showing 'sr' from database in hyperlink when I hover over the "delete" button. Full code is attached below. Let me know if find the issue.
if ($result->num_rows > 0) {
// output data of each row
echo "<table border = '1'>
<tr>
<th>Sr. No</th>
<th>Task Title</th>
<th>Task Details</th>
<th>Action</th>
</tr>";
while($row = mysqli_fetch_array($result)) {
echo "<tr>";
echo "<td>". $row["sr"] . "</td>";
echo "<td>". $row["task_title"] ."</td>";
echo "<td>". $row["task_details"] . "</td>";
echo "<td>" ;
echo '<a href="http://localhost/crudapp/crud_functions/delete.php?sr=$row[sr]">Delete</a>';
echo "</td>";
echo "</tr>";
}
echo " </table>";
}
source https://stackoverflow.com/questions/70137098/hyperlink-is-not-showing-sr-from-database
Comments
Post a Comment