I am trying to create website with login form with some PHP code, were user will try to login with username and password and page will then show \"welcome....\". AT the moment w
First off...dont store the password in the session. Thats just asking for trouble.
session_register("password");
Secondly....session_register() is a deprecated function and shouldn't be used anymore.
Instead do...
$_SESSION['username'] = $myusername;
Third....
header("location:page1.html");
Should be a PHP file if you want sessions to work across pages..
header("location:page1.php");
Then in that PHP page do...
session_start();
if(!isset($_SESSION['username'])){
header("location:index.php");
} else {
// Display stuff to logged in user
}