I want to create user profile by retriving data from mysql

<html>
<body>
<?php
function error_found(){
  header("Location: login.php");
}
set_error_handler('error_found');
?>
<?php
$con=mysqli_connect('localhost','root','','mydb');
session_start();
if(isset($_POST['loginbtn'])){
$email=$_POST['email'];
$password=$_POST['pwd'];
$result=mysqli_query($con,'select * from myguests where email="'.$email.'" and password="'.$password.'"');
if(mysqli_num_rows($result)==1)
{
	$_SESSION['email']= $email;
	header("Location: welcome.php");
}
else
	echo"INVALID ACCOUNT";

}

?>

</body>
</html>

this my validation page .please help me to create “welcome.php” that should display the all information about the user

Welp, you can follow this tutorial (improved security ;))