Please help. I am trying to use sessions instead of cookies for my simple site. But for some reason I am creating the sessions but it is not saving the data to it ie
This is the included file in the page
<?
session_register( \\"session\\" );
session_start();
function cleanMemberSession ($clan_id, $clan_name, $clan_abb, $pass )
{
global $session;
$session[id] = $id;
$session[clan_name] = $clan_name;
$session[clan_abb] = $clan_abb;
$session[pass] = $pass;
$session[logged_in] = true;
}
function checkUser()
{
global $session, $logged_in;
$session[logged_in] = false;
$member = getRow( \\"clans\\", \\"id\\", $session[id] );
if ( ! $member ||
$member[clan_name] != $session[clan_name] ||
$member[pass] != $session[pass] )
{
header( \\"Location: ../login.php\\" );
exit;
}
$session[logged_in] = true;
return $member;
}
?>
And here is the page what excutes it
cleanMemberSession( $id, $form[clan_name], $form[clan_abb], $form[password] );
header( \\"Location: ../login.php?\\".SID );
I get no erros but I have put this simple page to test if the sessions has saved the info I wanted
here is simple login page
<?php
include(\\"real.inc\\");
include(\\"dblib.inc\\");
?>
<head><title>Login</title></head>
<p>Welcome to login page </p>
<?php
print \\"Clan name is $clan_name\\n\\";
print \\"password is $id\\n\\";
?></body>
It should print the password and name if im correct but it is not.
Please help if ya can