<?
session_start();
include('Connections/nto.php');
$gm = $_POST['gm'];
$pass = $_POST['pass'];
if ((!$gm) || (!$pass)) {
header("location:login.php");
exit();
}
if (!($connection = @ mysql_connect($hostname_mysql, $username_mysql, $password_mysql))) die("Could not connect to database");
if (!mysql_select_db($database_mysql, $connection));
$query1 = "SELECT * FROM team WHERE team_name='$gm' AND password='$pass'";
if (!($result1 = @ mysql_query ($query1, $connection)));
$login_check = mysql_num_rows($result1);
if ($login_check > 0) {
while($row = mysql_fetch_array($result1)){
foreach( $row AS $key => $val ){
$$key = stripslashes( $val );
}
$_SESSION['gm1'] = $gm;
$_SESSION['enl1'] = $enl;
$_SESSION['city1'] = $city;
$_SESSION['name1'] = $name;
$_SESSION['color1'] = $color1;
header("Location: index.php");
}
}
else {
header("location:login.php");
}
?>
Heres my problem. This page does not register the session. At all. If i do a echo of $_SESSION['gm1'] it shows nothing. any ideas ?