

<?php
 if ($_SESSION['login']=='') {
    echo "<script type='text/javascript'> document.location = 'index.php'; </script>";
 }else{
    
 }


//users details 
$user_email=$_SESSION['login'];
//echo $_SESSION['login'];
// $user_id=$_SESSION['id'];
// $user_username=$_SESSION['username'];






//user info



$sql = "SELECT * FROM teachers where email ='$user_email'";
$result = mysqli_query($conn, $sql);

if (mysqli_num_rows($result) > 0) {
    // output data of each row
    if($row = mysqli_fetch_assoc($result)) {
        
        
		$full_name=$row["name"];
		 $_SESSION['teacher_id']= $row["id"];
			$teacher_id=$row["id"];
		$email = $row["email"];
		$class = $row["class"];
		$phone_number = $row["phone_number"];
		$is_admin = $row["is_admin"];
	


        
    }
}
//end of user info
