[RESOLVED] Session Problem
I wrote this to secure the page by password & username:
Code:
@session_start();
if($_POST['mkses']){
$_SESSION['id']=$_POST['id'];
$_SESSION['pass']=$_POST['pass'];
}
if($_SESSION['id']!="aaa" and $_SESSION['pass']!="aaa"){
echo '<form method="post" action='.$_SERVER[PHP_SELF].' >';
echo "<input type='text' name='id'><input type='text' name='password'>";
echo "<input type='submit' name='mkses' value='login'></form>";
exit;
}
when I enter the password & username it display page without problem, the page consists of a form to enter information and the form Action is set to the same page, when I click submit it show me the message to enter username and password again, that means it didn't save the session?
what is the problem?
thank's
Re: [RESOLVED] Session Problem
This whole process would have been done like 10 posts ago. Moral of thread, dont use Error Suppressors while debugging .