i used in page1.php
if($password != $pass2){
echo "Password incorrecta";
exit;
}
else
if($password == $pass2){
session_start();
$_SESSION[user] = $user;
header("Location:page2.php");
}
in page2.php i have the following
$user = $_SESSION[user];
echo $user;
it still comes empty. I'm begging to despair.