0

newbie question here.. i have login code as below, with below codes would require the Session Global On to be function. The question is how to modify the codes so that it will work with the Session Global Off? pls advise..

<?

session_start();
if(isset($submit) )
{
include ("config.php");
include ("../dbcon.php");
include ("functions.php");;

$result=mysql_query("select * from users where login='$username'");
$row=mysql_fetch_array($result);

$pasw=$row["pass"];
}
if($pasw==$password){
$HTTP_SESSION_VARS['l']=$username;
$HTTP_SESSION_VARS['p']=$password;


Header("Location: ../index.php");
exit;
}
else
header("Location: ../index.php?page=loginfailed");


?>

1 Answers1

0

Use $_SESSION['variable_name'] instead of globally register HTTP_SESSION_VARS

Praveen D
  • 2,337
  • 2
  • 31
  • 43