In my script, this is what I have...
User input page -> process user input and store username/pass into sessions (is this dangerous?) -> main login page where sessions are retrieved.
$_SESSION['username']=$loginusername;
$_SESSION['password']=$passwd;
include "redirect.php";
That was putting it into the session, and in the main login page, this is where the sessions are gotten.
<?
session_start();
header("Cache-control: private");
include "file.php"
?>
Inside the file is:
$loginusername = $_SESSION['username'];
$passwd = $_SESSION['password'];
$qry=mysql_query("select username from userdb where username = '$loginusername' and password = '$passwd'");
if (!$qry)
echo "error";
There is no error, as I guess the empty query doesn't matter, but the sessions never show up. Any ideas?