I'm trying writing code for search employee and I'm getting the error "Undefined index: employee_no".
Any help would be appreciated. Sorry if this question isn't posted right. This is my first time using this site.
<head>
    <title>Search Employee</title>
    <meta charset="utf-8" />
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <link rel="stylesheet" type="text/css" href="employee_form.css">
</head>
<body>
    <a href="index.html">Home</a>
    <?php
        require ('mysqli_connect.php');
        $employee_no = $_POST['emp_no']; //here is where it is saying the problem is
        $sql = mysqli_query($dbc, "SELECT * FROM employee WHERE emp_no='$employee_no'");
        while ($row = mysqli_fetch_array($sql)){
            $forename = $row['first_name'];
            $surname = $row['last_name'];
            $emp_no = $row['emp_no'];
            echo "<h2> Employee: ".$emp_no." ---> ".$forename." ".$surname."</h2>";
        }
        mysqli_close($dbc); 
    ?>
</body>
</html>
//the form is
Employee Management System
    <h3>Search Employee: Enter the employee no!</h3>
    <form action="search_emp.php" method="POST">
        <p> Employee No: <input type="NUMBER" name="employee_no" min="101" max="999" required/> </p>
        <p> <button class="search_employee" type="submit">Search</button> </p>
    </form>
 
    