I am new to PHP I need a little help in my php login script... I had 3 pages
1. index.html (user type username and password )
2. login.php
3. logout.php
ie index.html
<html>
/Main Page ///////
<body>
<form action="login.php" method="post">
<input name="uname" type="text" id="uname" />
<input name="pass" type="text" id="pass" />
<input type="submit" name="Submit" value="Submit" />
</form>
</body>
</html>
login.php
<html>
<?php
$uname=$_POST;
$pass=$_POST;
if ($uname=='ram' && $pass=='mypass'){
echo "Welcome RAM ";
}else{
$ok='index.html';
header('Location: ' . $ok);
}
?>
<a href="logout.php">Logout</a>
<html>
logout.php
<?php
echo "SIGN OUT ";
?>
Now the problem is after we sign out and return back to previous page using browser and then thelogin.php page came with the username . From journals I read about cookie delete and session... But i am not aware about it please help me what changes I would made for that ... Please help me...................
Regards
Rajeesh