I'm doing something wrong when I check if a form is filled in.
this is the code that checkes the form:
afther the else comes a code that put the data in a mysql.
when I just hit the form button i get multiple errors:
I think the if, if, if,,, else is wrong. the code should stop if one of these fields is empty.
hmm when I only fill in a wachtwoord (password) then it doesn't give any error and goes to the script completly
please hellup
this is the code that checkes the form:
| Code: |
|
if ($voornaam == "") $msg1 = "Uw voornaam is niet ingevuld!<br>"; if ($achternaam == "") $msg2 = "Uw achternaam is niet ingevuld!<br>"; if ($telefoonnummer == "") $msg3 = "Uw telefoonnummer is niet ingevuld!<br>"; if ($emailadres == "") $msg4 = "Uw e-mailadres is niet ingevuld!<br>"; if ($gebruikersnaam == "") $msg5 = "Uw gebruikersnaam is niet ingevuld!<br>"; if ($wachtwoord == "") $msg6 = "Uw wachtwoord is niet ingevuld!<br>"; else |
afther the else comes a code that put the data in a mysql.
when I just hit the form button i get multiple errors:
| Quote: |
|
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in C:\Documents and Settings\golles\Mijn documenten\Website\Project PHP en MySQL\registratie.php on line 36 Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\Documents and Settings\golles\Mijn documenten\Website\Project PHP en MySQL\registratie.php on line 38 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\Documents and Settings\golles\Mijn documenten\Website\Project PHP en MySQL\registratie.php on line 38 Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\Documents and Settings\golles\Mijn documenten\Website\Project PHP en MySQL\registratie.php on line 40 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\Documents and Settings\golles\Mijn documenten\Website\Project PHP en MySQL\registratie.php on line 40 Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in C:\Documents and Settings\golles\Mijn documenten\Website\Project PHP en MySQL\registratie.php on line 42 Warning: Cannot modify header information - headers already sent by (output started at C:\Documents and Settings\golles\Mijn documenten\Website\Project PHP en MySQL\registratie.php:36) in C:\Documents and Settings\golles\Mijn documenten\Website\Project PHP en MySQL\registratie.php on line 45 |
I think the if, if, if,,, else is wrong. the code should stop if one of these fields is empty.
hmm when I only fill in a wachtwoord (password) then it doesn't give any error and goes to the script completly
please hellup
