[FONT="Century Gothic"]
[SIZE="6"]V11/V14 Registerscript[/SIZE]
Das Registerscript stammt aus Ragezone und wurde von mir Übersetzt.
Alles anzeigen
[COLOR="Red"][*]Bitte deine SQL Daten eingeben.[/COLOR]
[COLOR="SeaGreen"][*]Dein MD5 Hash aus der Neuz.[/COLOR]
How To Use
1: Genannte Punkte editieren.
2: Speicher das Script als register.php.
Credits:
Greenmong: Für das Script.
Loqii: Für die Übersetzung.
[/FONT]
[SIZE="6"]V11/V14 Registerscript[/SIZE]
Das Registerscript stammt aus Ragezone und wurde von mir Übersetzt.
PHP-Quellcode
- <?php
- ini_set('display_errors', 0);
- $connection = mssql_connect('[COLOR="Red"]Dein Name-PC/SQLExpress[/COLOR]', 'sa', '[COLOR="Red"]Dein Passwort[/COLOR]');
- if(!connection || !mssql_select_db('ACCOUNT_DBF', $connection))
- {
- die('Konnte keine verbindung zum MSSQL Server herstellen');
- }
- $checkusername = $_POST['Username'];
- $query = mssql_query("SELECT account FROM ACCOUNT_DBF WHERE account = '$checkusername'");
- $result = mssql_fetch_row($query);
- if(isset($_POST['submit'])){
- if($_POST['Username'] == ""){
- $error = '<font color="red">Bitte gib deinen Accountnamen an.</font>';
- }
- else if($result[0] == $checkusername){
- $error = '<font color="red">Dein Accountsname ist bereits vergeben.</font>';
- }
- else if($_POST['Passwort'] == ""){
- $error = '<font color="red">Bitte ein Passwort eingeben.</font>';
- }
- else if($_POST['Password2'] == ""){
- $error = '<font color="red">Du hast kein Passwort angegeben.</font>';
- }
- else if($_POST['Password'] != $_POST['Password2']){
- $error = '<font color="red">Deine Passwörter stimmen nicht ün</font>';
- }
- else if($_POST['birthday'] == ""){
- $error = '<font color="red">Bitte gib dein Geburtsdatum an.</font>';
- }
- else if($_POST['mail'] == ""){
- $error = '<font color="red">BItte gib deine E Mail Adresse an.</font>';
- }
- else{
- $password = md5('[COLOR="SeaGreen"]kikugalanet[/COLOR]' . $_POST['Password']);
- $stmt = mssql_init('webCreateAcc', $connection);
- mssql_bind($stmt, '@account', $checkusername, SQLVARCHAR, false, false, 15);
- mssql_bind($stmt, '@password', $password, SQLVARCHAR, false, false, 36);
- mssql_bind($stmt, '@birthday', $_POST['birthday'], SQLVARCHAR, false, false, 120);
- mssql_bind($stmt, '@email', $_POST['mail'], SQLVARCHAR, false, false, 120);
- mssql_execute($stmt) or die ("Could not complete the registration. Please try again.");
- mssql_free_statement($stmt);
- $error = '<font color="green">Dein Account Wurde erstellt</font>';
- }
- }
- echo '<form action="register.php" method="post">';
- echo 'Account: <input type="text" name="Username" /><br /><br />';
- echo 'Passwort: <input type="password" name="Password" /><br /><br />';
- echo 'Passwort wiederholen: <input type="password" name="Password2" /><br /><br />';
- echo 'Geburtsdatum: <input type="text" name="birthday" /><br /><br />';
- echo 'E-mail Adresse: <input type="text" name="mail" /><br />';
- echo '<input type="submit" name="submit" value="Registrieren" />';
- echo '</form>';
- echo $error;
- ?>
[COLOR="Red"][*]Bitte deine SQL Daten eingeben.[/COLOR]
[COLOR="SeaGreen"][*]Dein MD5 Hash aus der Neuz.[/COLOR]
How To Use
1: Genannte Punkte editieren.
2: Speicher das Script als register.php.
Credits:
Greenmong: Für das Script.
Loqii: Für die Übersetzung.
[/FONT]