0

新手问题在这里..我有如下登录代码,下面的代码需要 Session Global On 才能运行。问题是如何修改代码以使其与 Session Global Off 一起使用?请给个建议..

<?

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");


?>
4

1 回答 1

0

使用 $_SESSION['variable_name'] 而不是全局注册 HTTP_SESSION_VARS

于 2013-10-03T05:56:04.340 回答