Hallo, als ik nu nog een tabel wil bijmaken met email; wat moet ik dan hier aan toevoegen?
Zodat er een vak voor email bij komt:
en hierboven dat iemand ook zijn email moet ingeven en die ook in de database zet.
Zeg je prijs.
Bedankt
Zodat er een vak voor email bij komt:
CREATE TABLE `leden` ( `id` int(11) NOT NULL auto_increment, `username` varchar(25) NOT NULL default , `password` varchar(32) NOT NULL default , PRIMARY KEY (`id`) ); Spoiler tonen
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"config.php"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"functions.php"[/COLOR][COLOR= #007700]);[/COLOR]
?>
<html>
<head>
<title>MultiSess Aanmelden</title>
</head>
<body>
[COLOR= #0000BB]<?php[/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][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]signup[/COLOR][COLOR= #007700]])) {[/COLOR]
[COLOR= #0000BB]$signup_sql[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO leden VALUES(,"[/COLOR][COLOR= #007700].[/COLOR]sqlsafe[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]","[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/md5"]md5[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]")"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$signup_sql[/COLOR] [COLOR= #007700]==[/COLOR] TRUE[COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Dit lid is succesvol aangemeld"[/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]"Error: Dit lid is niet succesvol aangemeld wegens: "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]();
}
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<form method="POST" action="">
<table border="0" cellpadding="0" cellspacing="0" width="32%" id="table1">
<tr>
<td width="139">Naam</td>
<td>
<p><input type="text" name="username" size="26"></p>
</td>
</tr>
<tr>
<td width="139">Wachtwoord:</td>
<td><input type="text" name="password" size="26"></td>
</tr>
<tr>
<td width="139"> </td>
<td><input type="submit" value="Verzenden" name="signup"></td>
</tr>
</table>
</form>"[/COLOR][COLOR= #007700];
}[/COLOR]
?>
</body>
</html>Zeg je prijs.
Bedankt
05: