Notice: Undefined index: email in F:\xamp\htdocs\firse\addTeacher.php on line 5

i am not able to insert email to the database but userid and password have inserted

<?php

    $userid= trim($_POST["userid"]);
    $password = trim($_POST["password"]);
    $email=trim($_POST["email"]);
    $con = mysqli_connect("localhost", "root", "", "tryagain");
    if($con === false)
    {
        die("ERROR: Could not connect. " . mysqli_connect_error());
    }   
    $query="SELECT userid FROM teacherid WHERE userid='$userid'";
    $result=mysqli_query($con,$query);
    $numrows=mysqli_num_rows($result);

    if($numrows > 0)
    {     
            echo "userid already exist in teacherid relation";
    }   
    else
    {
        $addquery="INSERT into teacherid(userid,password,email)values('$userid','$password','$email')";
        $addresult=mysqli_query($con,$addquery);
        if($addresult)
            echo "iserted successfully";
    }

?>