ich habe folgendes problem:
ich will eine Passwortabfrage einrichten wo der client eine Checkbox anklicken kann, wodurch dann ein cookie platziert wird
der user soll anhand des cookies wiedererkannt werden damit sein Passwort das er beim letzten besuch eigegeben hat wieder in das eingabefeld kopiert wird und er bloß noch Enter drücken muss
hier mal mein script:
ich will eine Passwortabfrage einrichten wo der client eine Checkbox anklicken kann, wodurch dann ein cookie platziert wird
der user soll anhand des cookies wiedererkannt werden damit sein Passwort das er beim letzten besuch eigegeben hat wieder in das eingabefeld kopiert wird und er bloß noch Enter drücken muss
hier mal mein script:
Code:
[SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]<h2 [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]align[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]"center">[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]Kleine Passwortformalit[B][I]ä[/I][/B];t[/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]</h2>[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]<form [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]action[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]"index.php" [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]method[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]"post">[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]<table [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]align[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]"center"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]>[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]<tr>[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]<td>[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]<b>[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]Passwort:[/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]</b>[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]</td>[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]<td>[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]<input [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]type[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]"password" [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]name[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]"pass"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] /[/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]>[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]</td>[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]<td>[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]<input [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]type[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]"submit" [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]value[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]"senden"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] /[/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]>[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]</td>[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]</tr>[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]<tr>[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]<td></td><td></td><td>[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]<input [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]type[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]"checkbox" [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]name[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]"speichern"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] /[/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]>[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]<b>[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]passwort speichern ??[/SIZE][SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]</b>[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]</td>[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]</tr>[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]</table>[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#0000f0][SIZE=2][COLOR=#0000f0]</form>[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2]<?php[/SIZE]
[SIZE=2]if (isset ($_POST['speichern'])) {[/SIZE]
[SIZE=2]setcookie("savepw", "yes" , time()+86400*30);[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2]?>[/SIZE]
[SIZE=2]<?php if (isset ($_COOKIE["savepw"]) && $_COOKIE["savepw"] == "yes"){[/SIZE]
[SIZE=2]echo "cookie wurde erkannt";[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2]?>[/SIZE]