Ja oké, maar die query heb ik al.
Alvast bedankt, ik ga even kijken of ik het werkend kan krijgen!
EDIT:
Ik heb nu deze code, maar dit werkt helaas niet. Alles is dubbelgechecked...
Alvast bedankt.

Alvast bedankt, ik ga even kijken of ik het werkend kan krijgen!

EDIT:
Ik heb nu deze code, maar dit werkt helaas niet. Alles is dubbelgechecked...
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/ob_start"]ob_start[/URL][COLOR= #007700]();[/COLOR]
?>
<!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>Inloggen</title>
</head>
<body>
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]config.php[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #FF8000]//Kijken of de ingevulde gebruikersnaam hoort bij het ingevulde wachtwoord[/COLOR]
[COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM leden WHERE gebrnaam = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]"
AND wachtwoord = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700])
{[/COLOR]
[COLOR= #FF8000]//Als het klopt: cookie aanmaken, en weergeven dat je succesvol bent ingelogd [/COLOR]
[URL="http://www.php.net/setcookie"]setcookie[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"ingelogd"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]],[/COLOR] [URL="http://www.php.net/Time"]Time[/URL][COLOR= #007700]()+[/COLOR][COLOR= #0000BB]3600[/COLOR][COLOR= #007700]*[/COLOR][COLOR= #0000BB]24[/COLOR][COLOR= #007700]*[/COLOR][COLOR= #0000BB]7[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Succes[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Location: succes.php[/COLOR][COLOR= #007700]);
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Failed[/COLOR][COLOR= #007700];
}[/COLOR]
?>
<form action="" method="post">
<table border="0">
<tr>
<td><input type="text" name="naam" value="Gebruikersnaam" size="20px"></td>
</tr>
<tr>
<td><input type="password" name="pass" value="Wachtwoord" size="20px"></td>
</tr>
<tr>
<td><input type="submit" name="inloggen" value="Inloggen"></td>
</tr>
</table>
</form>
</body>
</html> Alvast bedankt.

setcookie("ingelogd", $_POST[naam], Time()+3600*24*7);

