i write a login.php code,after click login button , it jump movie1.php and it display that Warning: open(/tmp\sess_378521381be2fb4928ce8c065bc0465e, O_RDWR) failed: No such file or directory (2) in c:\foxserv\www\movie1.php on line 2,could anyone help me?
login.phpcode content :
<?php
session_unset();
?>
<html>
<head>
<title>Please Log In</title>
</head>
<body>
<form method="post" action="http://localhost/movie1.php">
<p>Enter your username:
<input type="text" name="user">
</p>
<p>Enter your password:
<input type="password" name="pass">
</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>
</body>
</html>
movie1.php content is:
<?php
session_start();
$SESSION['username']=$POST['user'];
$SESSION['userpass']=$POST['pass'];
$_SESSION['authuser']=0;
//Check username and password information
if (($_SESSION['username']== 'Joe') AND
($_SESSION['userpass']== '12345'))
{
$_SESSION['authuser']=1;
}
else
{
echo "Sorry, but you don't have permission to view this
page, you loser!";
exit();
}
?>
<HTML>
<HEAD>
<TITLE>Find my Favorite Movie!</TITLE>
</HEAD>
<BODY>
<?php include "header.php" ?>
<?php
$myfavmovie=urlencode("Life of Brian");
echo "<a href='http://localhost/moviesite.php?favmovie=$myfavmovie'>";
echo "Click here to see information about my favorite movie!";
echo "</a>";
echo "<br>";
//delete these lines
echo "<a href='http://localhost/moviesite.php'>";
echo "Click here to see my top 10 movies.";
echo "</a>";
echo "<br>";
echo "<a href='http://localhost/moviesite.php?sorted=true'>";
echo "Click here to see my top 10 movies, sorted alphabetically.";
echo "</a>";
//end of deleted lines
echo "Or choose how many movies you would like to see:";
echo "</a>";
echo "<br>";
?>
<form method="post" action="http://localhost/moviesite.php">
<p>Enter number of movies (up to 10):
<input type="text" name="num">
<br>
Check here if you want the list sorted alphabetically:
<input type="checkbox" name="sorted">
</p>
<input type="submit" name="Submit" value="Submit">
</form>
</BODY>
</HTML>