Question and answer is powered by AnsPress.io
Store session value in a session variable using PHP
$_SESSION["user_id"]=$u_id;
you can check the value is exist in a session variable, try this code
<?php if(!empty($_SESSION['user_id'])) { echo "Your session Value is: " .$_SESSION['user_id']; } ?>