This has been resolved. I had not put the,
header("Cache-control: private");
In the code.
Hey guys, I am in need of some help. After doing a tutorial on sessions I am unable to make it work. I am using the following code to register my session:
----Code----
<?
$user = $POST['username'];
$pass1 = md5($POST['password']);
$pass = substr($pass1, 0, 10);
session_start();
$_SESSION['user'] = $user;
//successful login code will go here...
echo 'Success!';
echo '<META HTTP-EQUIV="refresh" CONTENT="3; URL=http://24.208.244.240/vlogs/index.php">';
?>
----/Code----
This page give me no errors and takes me to the next page. On the next page is where I get the errors. Tode looks like the following:
----Code----
<?
session_start();
?>
<HTML>
<BODY>
<CENTER>
<IMG SRC="splash.png">
</CENTER>
<BR><BR>
<?
echo $_SESSION['user'];
?>
</BODY>
</HTML>
----/Code----
The error I get is, Notice: Undefined index: user in c:\inetpub\wwwroot\vlogs\index.php on line 12.
Any help would be greatly appreciated. I have also read that Global Varibles are a BAD thing so I am trying to code without using them.