hallo,
ik heb een registreer formulier gemaakt maar het werkt niet:
wie dit oplost word beloond uiteraard!
ik heb een registreer formulier gemaakt maar het werkt niet:
<!--
Copyright 2010/2011 KBRS
Gemaakt door:
Klaas Yntema & Bas van den Hoogen
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>KBRS - het beste systeem!</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"></meta>
<link rel="stylesheet" type="text/css" media="screen" href="../include/style.css" />
</head>
<body>
<center>
<h3>Nieuwe beheerder aanmaken:</h3>
<br />
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]../include/config.php[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]POST[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]beheerders[/COLOR][COLOR= #007700]])) {[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700](![/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]loginnaam[/COLOR][COLOR= #007700]])) {[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700](![/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]wachtwoord[/COLOR][COLOR= #007700]]))[/COLOR]
[COLOR= #0000BB]$loginnaam[/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]loginnaam[/COLOR][COLOR= #007700]]);[/COLOR]
[COLOR= #0000BB]$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]wachtwoord[/COLOR][COLOR= #007700]]);[/COLOR]
[COLOR= #0000BB]$sql[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO `requests` (loginnaam, wachtwoord, lastlogin) VALUES ($loginnaam,$wachtwoord, NOW())"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]) {[/COLOR]
[COLOR= #0000BB]$melding[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]Aanvraag is verzonden! <META http-equiv="refresh" content=1; URL=index.php">[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]//Melding als de aanvraag is verzonden.[/COLOR]
[COLOR= #007700]}[/COLOR]
[URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[COLOR= #0000BB]$melding[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]Er is iets mis gegaan neem contact op met de webmaster[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]//Melding als er iets fout is gegaan.[/COLOR]
[COLOR= #007700]}
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[COLOR= #0000BB]$melding[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]Er zijn geen gegevens ingevuld![/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]//Melding als er geen gegevens zijn ingevuld!.[/COLOR]
[COLOR= #007700]}
}
}[/COLOR]
?>
<html>
<head>
</head>
<body>
<form action="tuser.php" method="post">
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$melding[/COLOR][COLOR= #007700])) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]
<tr>
<td>[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$melding[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]</td>
</tr>
[/COLOR][COLOR= #007700];
}[/COLOR]
?>
<br />
<table>
Gebruikersnaam: <input type="text" name="loginnaam" />
Wachtoord: <input type="password" name="wachtwoord" />
<input type="submit" value="Maak de beheerder aan!" name="beheerders" />
</table>
</form>
</center>
</body>
</html> wie dit oplost word beloond uiteraard!


