
<h2>All records:</h2>
<?
include "conninfo.php"; //database

$query = "SELECT * FROM people";
$result = mysqli_query($link, $query);


$numrows = mysqli_num_rows($result);//get the row number

while($r = mysqli_fetch_array($result))
	{
	echo $r["id"]." ";
	echo $r["fname"]." ";
	echo $r["sname"]." ";?>
	
	<form action="delete.php" method="post">
	<input type="hidden" name="id" value="<?echo $r["id"]?>">
	<input type="submit" value="Delete">
	</form>
	
	<form action="enteredit.php" method="post">
	<input type="hidden" name="id" value="<?echo $r["id"]?>">
	<input type="submit" value="Edit">
	</form>
	
	
	<?}


?>