while($row=mysqli_fetch_assoc($result)){
echo "<tr>";
echo ('<td>'.$row['idNo'].'</td>');
echo ('<td>'.$row['FirstName'].'</td>');
echo ('<td>'.$row['LogId'].'</td>');
echo ('<td>'.$row['PassCode'].'</td>');
echo '<td><a href="edit.php?id=' . $row['idNo'] . '">Edit</a></td>';
echo '<td><a href="delete_contestant.php?id=' . $row['idNo'] . '">Delete</a></td>';
echo("</tr>");}
Code of delete_contestant.php
pages are given below. But when i am trying to delete an item it
shows Undefined index: idNo in Line 3
Even i was trying to print $_GET['idNo']
but it was not working.
<?php
include('mysql_connect.php');
echo $_GET['idNo'];
if(isset($_GET['idNo']))
{
$id=$_GET['idNo'];
$sql="DELETE FROM addContestant WHERE idNo=$id";
if(mysqli_query($conn,$sql))
{
echo "Item deleted";
}
else
echo "There was a problem".mysqli_error($conn);
}
?>