Lost session varible between pages
movie1.php
<?php session_start();
$_session['username']="Jhon";
$_session['authuser']=1;
?>
<?php
$myfavmovie=urlencode("transformers");
echo "";
echo "Click here to see information about my favorite movie!";
echo "
".$_session['username']; //ok, display Jhon
?>
moviesite.php
<?php session_start();
/*
if ($_session['authuser'] != 1){
echo $_session['authuser'];
echo "Sorry, but you don't have pemission to view the page, you loser!";
exit();
}
*/
?>
Welcome to our site,
<?php echo $_session['username'] ?>! //doesn't work, display nothing,why?
My favorite movie is
<?php echo $_request['favmovie'] ?>! //doesn't work, display nothing,why?
<?php $movierate=5; ?>
My movie rating for this movie is:
<?php echo $movierate; ?>
//register_globles = OFF
------解决方案--------------------
$_SESSION大写