我想从数据库中获取id值

I want to delete a row from my data-table so I need to get the id value from database and then delete it.

$id = $_GET['id'];
$result = mysqli_query($con, "DELETE FROM registre where id=$id");

This code doesn't get the id value from database, I don't have a row for id in my data-table so I need to get from to db and then delete it.

Try this using prepated statement :

$stmt = $mysqli->prepare("DELETE FROM registre where id= ?");
$bind = $stmt->bind_param('i', $id);
$exec = $stmt->execute();

Try this maybe it helps

$id = $_GET['id'];
 $result = mysqli_query($con, 'DELETE FROM registre where id=' . $id);

</div>