jeg ville også bruge den til denne
<?
header("Location: start.php");
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="
http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Login</title>
</head>
<body>
<?
$getusername = $_POST['username'];
$getpassword = $_POST['password'];
$password ="dsfadsfkdadfad246426fadsfjhadsfk";
$username ="adsifja45s564dkfjadslfkjadsflk";
include("../connect.php");
$sql = "select * from mylinksuser where username = '$getusername'";
$resultat = mysql_query($sql,$conn) or die(mysql_error());
while ($newarray = mysql_fetch_array($resultat)) {
// giv felterne et navn
$id = $newarray['id'];
$username = $newarray['username'];
$password = $newarray['password'];
$status = $newarray['status'];
// udskrivning til skærm
}
if($getpassword == $password){
$_SESSION['access'] = "yes";
$_SESSION['username'] = "$username";
$_SESSION['password'] = "$password";
$_SESSION['status'] = "$status";
include("start.php");
}else{
echo "<h1><center>Wrong Username or Password !</center></h1>";
include("index.php");
}
?>
</body>
</html>
Men hvis man skriver forkert kodeord kommer man af ligeved frem til siden da den bliver loadet til at starte med