login.php
Code: Alles auswählen
<html>
<head>
<title>
Login
</title>
</head>
<link rel="stylesheet" href="../css.css" type="text/css">
<body leftmargin=0 bgcolor=#FFFFFF background=../gfx/team3.gif>
<?php
if(isset($_COOKIE['user1']) && isset($_COOKIE['pw1'])){
header ("Location:benutzer.php");
}else{
?>
<form method='POST' action='benutzer.php'>
<table width='200'>
<tr>
<td width='30'>
Nick:</td>
<td width='70'><input type='text' name='user1' style='border-width:1; border-color:#000000; background: ../gfx/mindless3.gif; color:#000000'></td>
</tr>
<tr>
<td width='30'>Passwort:</td>
<td width='70'><input TYPE="password" name='pw1' style='border-width:1; border-color:#000000; background: ../gfx/mindless3.gif; color:#000000'></td>
</tr>
<tr>
<td width='30'>Automatischer Login:</td>
<td width='70'><input TYPE="checkbox" name="autologin" value="yes" style='border-width:1; border-color:#000000; background: ../gfx/mindless3.gif; color:#000000'></td>
</tr>
<tr>
<td width='30'></td>
<td width='70'><input type='submit' value='Login' name='login' style='border-width:1; border-color:#000000; background: ../gfx/mindless3.gif; color:#000000'></td>
</tr>
</table>
</form>
<?php
}
?>
</body>
</html>
Code: Alles auswählen
<?php session_start();
if($auto=="yes"){
setcookie("user1", $user1);
setcookie("pw1", $pw1);
}
?>
<html>
<head>
<title>
Memberbereich
</title>
<link rel="stylesheet" href="../css.css" type="text/css">
<body leftmargin=0 bgcolor=#FFFFFF background=../gfx/team3.gif>
<body>
<?php
if(isset($_COOKIE['user1']) && isset($_COOKIE['pw1'])){
$user1=$_COOKIE['user1'];
$pw1=$_COOKIE['pw1'];
}
include("members/$user1.php");//mit den Variabeln $user und $pw
if($user=="$user1" && $pw=="$pw1") {
usw.............