View Single Post
  #2 (permalink)  
Old March 21st, 2006, 09:25 AM
kelz84 kelz84 is offline
Registered User
 
Join Date: Mar 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

anyone can help or understand my problem? nvm anyway is there possibility i need to do some setting so that my session only will work? i tried this 2 simple example and it doesn't work for me as well.

test2.php :
<?php
    session_start();
    $_SESSION['user'] = 'kelz';
    //echo "<p>You Are now logged in, {$_SESSION['user']}!</p>";
    ob_end_clean();
    header( "Location: test3.php" );
    exit();
?>

test3.php :
<?php
    session_start();
    if (isset(!$_SESSION['user']))
    {
    header( "Location: loginerror.php" );
    exit();
    }
    $page_title = 'Logged In!';
    echo "<p>You Are now logged in, {$_SESSION['user']}!</p>";
?>


is there something wrong with my computer setting ? thx guys

Reply With Quote