Heey,
Er zit nog een foutje in, maar dan nu in me inlog-systeem op lijn 166.
Zien jullie m misschien?
Het schijnt iets te zijn met "session_start()".
Dit is de code:
Er zit nog een foutje in, maar dan nu in me inlog-systeem op lijn 166.
Zien jullie m misschien?
Het schijnt iets te zijn met "session_start()".Dit is de code:
<html>
<head>
<style type="text/css">
body, html {
background-color: #808080;
padding: 0;
margin: 0;
}
input {
border: 1px solid #000000;
}
.headertekst {
margin: 10px 0 25px 80px;
}
.menu_subheader {
background-color: #0066ff;
width: 240px;
height: 40px;
color: #ffffff;
font-size: 18px;
font-weight: bold;
border: 1px solid #ffffff;
padding-top: 9px;
padding-left: 15px;
margin-top: 3px;
margin-left: 4px;
}
.content_menu {
background-color: #0066ff;
width: 592px;
height: 40px;
color: #ffffff;
font-size: 16px;
font-weight: bold;
border: 1px solid #ffffff;
padding-top: 9px;
padding-left: 15px;
margin-top: 3px;
margin-left: 4px;
}
.content_menu a {
color: #ffffff;
font-size: 16px;
font-weight: bold;
text-decoration: none;
}
.content_menu a:hover {
color: #ffffff;
font-size: 16px;
font-weight: bold;
text-decoration: underline;
}
#main {
width: 859px;
height: 552px;
margin: -276px 0 0 -429.5px;
position: absolute;
top: 348px;
left: 50%;
}
#header {
height: 45px;
background: url("headerbg.jpg");
margin: 0px 0 2px 0;
padding: 0;
border-bottom: 1px dotted #ffffff;
color: #0066FF;
}
#menu {
height: 550px;
width: 250px;
background-color: #a9a9a9;
border: 1px dotted #ffffff;
}
#menu ul, li {
list-style-type: none;
}
#menu a {
color: #0066ff;
font-size: 12pt;
margin-left: 15px;
text-decoration: none;
}
#menu a:hover {
color: #0066ff;
font-size: 12pt;
margin-left: 15px;
text-decoration: underline;
}
#menu p {
color: #000000;
font-size: 12pt;
margin-left: 15px;
}
#menu h2 {
color: #000000;
font-size: 16pt;
margin-left: 15px;
}
#content {
height: 550px;
width: 600px;
background-color: #a9a9a9;
border: 1px dotted #ffffff;
position: absolute;
top: 0;
left: 252px;
}
#content h2 {
color: #000000;
font-size: 16pt;
margin-left: 0;
margin-right: 15px;
}
#content p {
color: #000000;
font-size: 12pt;
margin-left: 15px;
margin-right: 15px;
}
#content form {
color: #000000;
font-size: 12pt;
margin-left: 15px;
margin-right: 15px;
}
</style>
<title>Hoofdpagina</title>
</head>
<body>
<div id="header">
<img src="headertekst.jpg" class="headertekst">
</div>
<div id="main">
<div id="menu">
<div class="menu_subheader">Menu</div>
<h2>Hoofdmenu</h2>
<a href="http://www.oefenen.prutz0r.nl/index.php">Home</a><br/>
<a href="http://www.oefenen.prutz0r.nl/register.php">Aanmelden</a><br/>
<a href="http://www.oefenen.prutz0r.nl/login.php">Inloggen</a><br/>
<a href="http://www.oefenen.prutz0r.nl/sponsors.php">Sponsors</a><br/><br/>
<h2>Ledenmenu</h2>
<p>Niet ingelogd.</p>
</div>
<div id="content">
<div class="content_menu"><a href="http://www.oefenen.prutz0r.nl/index.php">Home</a> | <a href="http://www.oefenen.prutz0r.nl/adverteren.php">Adverteren</a> | <a href="http://www.oefenen.prutz0r.nl/stats.php">Statistieken</a> | <a href="http://www.oefenen.prutz0r.nl/faq.php">FAQ/Uitleg</a> | <a href="http://www.oefenen.prutz0r.nl/contact.php">Contact</a></div>
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]
?>
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$logout[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/session_destroy"]session_destroy[/URL][COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"U bent uitgelogd!"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][COLOR= #0000BB]$user[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][COLOR= #0000BB]$login[/COLOR][COLOR= #007700])
{[/COLOR]
?>
<html>
<head>
<title>Inloggen</title>
</head>
<form action="login.php?login=ja" method="POST">
<table>
<tr><td>Gebruikersnaam:</td><td><input type="text" name="user"></td></tr>
<tr><td>Wachtwoord:</td><td><input type="password" name="pass"></td></tr>
</table>
<input type="submit" name="submit" value="Inloggen">
</form>
</html>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
[URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #DD0000]""[/COLOR] [COLOR= #007700]&&[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])
{[/COLOR]
[COLOR= #0000BB]$user[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/addslashes"]addslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]]);[/COLOR]
[COLOR= #0000BB]$md5password[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/md5"]md5[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$pass[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$login[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"true"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$dbuser[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Ruben0_***"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$dbpass[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"***"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$dbhost[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"localhost"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$database[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Ruben0_***"[/COLOR][COLOR= #007700];[/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 members WHERE user = $user AND pass = $md5password"[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$aantalrijen[/COLOR] [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]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aantalrijen[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"U bent al ingelogd als"[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$user[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]",<P> a href=login.php?logout=uitloggen>log uit.</a>"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/session_register"]session_register[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"login"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/session_register"]session_register[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"user"[/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]"Dit wachtwoord is niet juist!"[/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]"U bent al ingelogd als "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$user[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]",<P> <a href=login.php?logout=uitloggen>log uit.</a>"[/COLOR][COLOR= #007700];
}
}[/COLOR]
?>
</div>
</div>
</body>
</html>
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/EXIT"]EXIT[/URL][COLOR= #007700]();[/COLOR]
?> 

En ik heb m al
Bedankt allemaal voor het helpen!
Er stond idd een accolade teveel onder de variabele query.
Ik zag al op 65 dat er geen values waren gegeven maar reageerde dus te laat
Ik doe het nog een keer, maar de volgende keer heb je echt pech