i save username in session then redirect to other page:
session_start(); $_SESSION['username']="hello"; header("location: home.php");
but in home.php page i lose $_SESSION['username']. this is not working in home.php:
echo $_SESSION['username'];
You need to put session_start() in your home.php file too.