This is my code im using for my login, but when it re-directs to the next page the $_SESSION array doesnt contain any data, what is wrong with my coding that causes this(btw to check it had no data I echoed it and nothing came onto my screen)
<?PHP
session_start();
mysql_connect("localhost", "*******", "*******")or die(mysql_error());
mysql_select_db("eluxian");
$email = $_POST['email'];
$pass1 = $_POST['password'];
$pass = md5($pass1);
$check = mysql_query("SELECT password FROM members WHERE email='$email'")
or die("Email not found in database");
$fetch = mysql_fetch_array($check) or die(mysql_error());
$password = $fetch['password'];
if ($password != $pass){
echo "You entered a bad password";
}else{
$_SESSION['email'] = $email;
echo "<meta http-equiv='Refresh' content='0;url=news.php'>";
echo "Correct password. Forwarding now...";
}
?>