Session Help
Posted: Wed Feb 14, 2007 2:28 am
feyd | Please use
This is the linked page ( app.php)
On the linked page I want the 'if' statement detect my session variable, but it doesn't worked
Please help me guys
Thanks
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi Guys, please help me with session
this the Login page codeCode: Select all
function handleSession($sName,$sEmail,$sPass){
$getConfig = md5($sName.$sEmail.$sPass);
$getDate = date("F j, Y, g:i a");
session_register('getConfig');
print("<p id='welcome'>Access granted to ".$sName." <a href='app.php'>click</a><br>(".$getDate.")");
};
if($_SERVER['REQUEST_METHOD'] == 'POST'){
if(empty($name) || empty($email) || empty($pass)) {
print("<p id='notification'>Please fill all fields</p>");
} else if(ereg("^.+@.+\\..+$",$email)) {
$loginAccount = md5($name.$email.$pass);
if($loginAccount == $config){
handleSession($name,$email,$pass);
} else {
print("<p id='notification'>Invalid Login Account</p>");
}
} else {
print("<p id='notification'>Your email is invalid</p>");
}
}Code: Select all
if($getConfig == $config){
apps();
} else {
print("<p id='notification'>You need to <a href='index.php'>login</a> to view this page</a></p>");
}Please help me guys
Thanks
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]