Hi, i need help ha ha,
My session_start() is not enabled or not working for some reason. here is my code,
movie1.php
Code:
<?php
session_start();
$_SESSION['username'] = 'Joe12345';
$_SESSION['authuser'] = 1;
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> Find my favorite Movie!</title>
</head>
<body>
<?php
$myfavmovie = urlencode('life of Brian');
echo "<a href=\"moviesite.php?favmovie=$myfavmovie\">";
echo 'Click here to see information about my favorite movie!';
echo '</a>';
?>
</body>
</html>
moviesite.php
Code:
<?php
session_start();
//check to see if user has logged in with a valid password
if ($_SESSION[['authuser'] !=1) {
echo 'Sorry, but you don\'t have permission to view this page!';
exit();
}
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>My Movie Site - <?php echo $_GET['favmovie']; ?></title>
</head>
<body>
<?php
echo 'Welcome to our site, ';
echo $_SESSION['username'];
echo '! <br/>';
echo 'My favorite movie is ';
echo $_GET['favmovie'];
echo '<br/>';
$movierate = 5;
echo 'My movie rating for this movie is: ';
echo $movierate;
?>
</body>
</html>
Any help would be great. When i take out the session_start() it will work, just will not pass variables obviously.I think it has to do with php.ini, im not sure, im new.
Thanks!