<form name= aanmelden method=POST action="" >
[COLOR= #0000BB]<?php
$data[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]keuze[/COLOR][COLOR= #007700]];[/COLOR]?>
<input name=keuze type=hidden value=[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"$data"[/COLOR]?>>
[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]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]registreer[/COLOR][COLOR= #007700]])){[/COLOR]
[URL="http://www.php.net/If"]If[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$data[/COLOR][COLOR= #007700]==[/COLOR]studenten[COLOR= #007700]) {[/COLOR]
[COLOR= #0000BB]$voornaam[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]voornaam[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$achternaam[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]achternaam[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$studentnummer[/COLOR][COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR]studentennummer[COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$opleiding[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]opleiding[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$jaar[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]jaar[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$wachtwoord[/COLOR][COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]wachtwoord[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$wachtwoord2[/COLOR][COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]wachtwoord2[/COLOR][COLOR= #007700]];[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$wachtwoord[/COLOR][COLOR= #007700]==[/COLOR][COLOR= #0000BB]$wachtwoord2[/COLOR] or [COLOR= #0000BB]$wachtwoord[/COLOR][COLOR= #007700]!=[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700])
{[/COLOR][URL="http://www.php.net/mysql_connect"]mysql_connect[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]localhost[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]jaliemoesalie[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]kjztau5spv[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/mysql_select_db"]mysql_select_db[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]jalimoesalie[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$query[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"SELECT COUNT(*) FROM studenten WHERE studentnummer=$studentnummer"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700])==[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]){[/COLOR]
[COLOR= #0000BB]$query[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"INSERT INTO studenten (voornaam,achternaam,studentennummer,opleiding, jaar,wachtwoord) VALUES($voornaam,$achternaam,$studentennummer,Opleiding,$jaar,$wachtwoord)"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/mysql_close"]mysql_close[/URL][COLOR= #007700]();}}[/COLOR]
[URL="http://www.php.net/else"]else[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700])!=[/COLOR][COLOR= #DD0000]"0"[/COLOR] [COLOR= #007700]){[/COLOR]
[URL="http://www.php.net/mysql_close"]mysql_close[/URL][COLOR= #007700]();[/COLOR] ?>
<table>
<tr>
<td>Type je voornaam in </td>
<td><input name=voornaam type=text value=[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"$voornaam"[/COLOR]?>></td>
</tr>
<tr>
<td>Type je achternaam in </td>
<td><input name=achternaam type=text value=[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"$achternaam"[/COLOR]?>></td>
</tr>
<tr>
<td>Type je studentennummer in </td>
<td><input name=studentennummer type=text value=><i><FONT COLOR="#FF0000"> Dit studentnummer bestaat al!</i></FONT> </td>
</tr>
<tr>
<td>Kies je opleiding </td>
<td><select size="1" name="opleiding" >
<option value="Bedrijfskundige Informatica">Bedrijfskundige Informatica</option>
<option value="Communication & Multimedia Design">Communication & Multimedia Design</option>
<option value="Informatica">Informatica</option>
<option value="Informatiedienstverlening en -management">Informatiedienstverlening en -management</option>
<option value="Information Security Management">Information Security Management</option>
<option value="Technische Informatica">Technische Informatica</option> <i><FONT COLOR="#FF0000"> Kies opnieuw je opleiding</i></FONT>
</td>
</tr>
<tr>
<td>Kies je jaar waar je nu in zit </td>
<td><select size="1" name="jaar">
<option value="1">1e jaar</option>
<option value="2">2e jaar</option>
<option value="3">3e jaar</option>
<option value="4">4e jaar</option><i><FONT COLOR="#FF0000"> Kies opnieuw je jaar</i></FONT></td>
</tr>
<tr>
<td>Type je wachtwoord in </td>
<td><input name=wachtwoord type=password value=></td>
</tr>
<tr>
<td>Type nog een keer je wachtwoord in </td>
<td><input name=wachtwoord2 type=password value=></td>
</tr>
<tr>
<td><input name=registreer type=submit value=registreer></td>
</tr>
</table>[COLOR= #0000BB]<?php[/COLOR] [COLOR= #007700]}
}
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$wachtwoord[/COLOR][COLOR= #007700]==[/COLOR][COLOR= #DD0000]""[/COLOR] or [COLOR= #0000BB]$wachtwoord[/COLOR][COLOR= #007700]!=[/COLOR][COLOR= #0000BB]$wachtwoord2[/COLOR][COLOR= #007700]) {[/COLOR]?>
<table>
<tr>
<td>Type je voornaam in </td>
<td><input name=voornaam type=text value=[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"$voornaam"[/COLOR]?>></td>
</tr>
<tr>
<td>Type je achternaam in </td>
<td><input name=achternaam type=text value=[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"$achternaam"[/COLOR]?>></td>
</tr>
<tr>
<td>Type je studentennummer in </td>
<td><input name=studentennummer type=text value=[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"$studentennummer"[/COLOR]?>></td>
</tr>
<tr>
<td>Kies je opleiding </td>
<td><select size="1" name="opleiding" >
<option value="Bedrijfskundige Informatica">Bedrijfskundige Informatica</option>
<option value="Communication & Multimedia Design">Communication & Multimedia Design</option>
<option value="Informatica">Informatica</option>
<option value="Informatiedienstverlening en -management">Informatiedienstverlening en -management</option>
<option value="Information Security Management">Information Security Management</option>
<option value="Technische Informatica">Technische Informatica</option> <i><FONT COLOR="#FF0000"> Kies opnieuw je opleiding</i></FONT>
</td>
</tr>
<tr>
<td>Kies je jaar waar je nu in zit </td>
<td><select size="1" name="jaar">
<option value="1">1e jaar</option>
<option value="2">2e jaar</option>
<option value="3">3e jaar</option>
<option value="4">4e jaar</option><i><FONT COLOR="#FF0000"> Kies opnieuw je jaar</i></FONT></td>
</tr>
<tr>
<td>Type je wachtwoord in </td>
<td><input name=wachtwoord type=password value=><i><FONT COLOR="#FF0000"> Het wachtwoord is niet hetzelfde of je hebt niks ingevuld</i></FONT></td>
</tr>
<tr>
<td>Type nog een keer je wachtwoord in </td>
<td><input name=wachtwoord2 type=password value=></td>
</tr>
<tr>
<td><input name=registreer type=submit value=registreer></td>
</tr>
</table>
[COLOR= #0000BB]<?php[/COLOR] [COLOR= #007700];}}[/COLOR]
[URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
?>
<form name= aanmelden method=POST action="" >[COLOR= #0000BB]<?php
$data[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]keuze[/COLOR][COLOR= #007700]];[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$data[/COLOR][COLOR= #007700]==[/COLOR][COLOR= #DD0000]studenten[/COLOR][COLOR= #007700]) {[/COLOR] ?>
<table>
<tr>
<td>Type je voornaam in </td>
<td><input name=voornaam type=text value=></td>
</tr>
<tr>
<td>Type je achternaam in </td>
<td><input name=achternaam type=text value=></td>
</tr>
<tr>
<td>Type je studentennummer in </td>
<td><input name=studentennummer type=text value=></td>
</tr>
<tr>
<td>Kies je opleiding </td>
<td><select size="1" name="opleiding">
<option value="Bedrijfskundige Informatica">Bedrijfskundige Informatica</option>
<option value="Communication & Multimedia Design">Communication & Multimedia Design</option>
<option value="Informatica">Informatica</option>
<option value="Informatiedienstverlening en -management">Informatiedienstverlening en -management</option>
<option value="Information Security Management">Information Security Management</option>
<option value="Technische Informatica">Technische Informatica</option>
</td>
</tr>
<tr>
<td>Kies je jaar waar je nu in zit </td>
<td><select size="1" name="jaar">
<option value="1">1e jaar</option>
<option value="2">2e jaar</option>
<option value="3">3e jaar</option>
<option value="4">4e jaar</option></td>
</tr>
<tr>
<td>Type je wachtwoord in </td>
<td><input name=wachtwoord type=password value=></td>
</tr>
<tr>
<td>Type nog een keer je wachtwoord in </td>
<td><input name=wachtwoord2 type=password value=></td>
</tr>
</table>
[COLOR= #0000BB]<?php[/COLOR] [COLOR= #007700]}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$data[/COLOR][COLOR= #007700]==[/COLOR][COLOR= #DD0000]bedrijf[/COLOR][COLOR= #007700]){[/COLOR] ?>
type je bedrijfsnaam in
[COLOR= #0000BB]<?php[/COLOR] [COLOR= #007700];}[/COLOR] ?>
<input name=registreer type=submit value=registreer>
[COLOR= #0000BB]<?php[/COLOR] [COLOR= #007700];}[/COLOR] ?>
</form> Ik heb me fout al gevonden