<?php
Include ‘connect.php’; ?>
<html>
<body>

<form align = "left" action="" method="post">
<label for="name">Enter the ID</label>
<input type="number" name="id" id="id" required>
<input type="submit" name=“submit" value=“submit" /> 
</form>


<?php
$uname = $_POST[‘id’];

$sql = "SELECT * FROM employee where id = '$uname' "; //select record from information where id is the id entered in html form

$result = mysqli_query($conn,$sql); //stores the result returned by the query in the result variable

$row = mysqli_fetch_assoc($result);        //Store the result in the array named row 

echo “ID is: " . $row["id"]. "<br> Name is: " . $row["name"]; //printing the value of the id and name  
?>
</body>
</html>
