Special;132735 schrieb:
hat jemand ein login script für die hp ? oder so :D
Meinst du Register Script?
Wenn ja:
PHP-Quellcode
- <?php
- ini_set('display_errors', 0);
- $connection = mssql_connect('NAME/SQLExpress', 'sa', 'PW');
- 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 überein.</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('kikugalanet' . $_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. Viel Spaß!</font>';
- }
- }
- echo '<form action="register.php" method="post">';
- echo 'Account:   ; <input type="text" name="Username" /><br /><br />';
- echo 'Passwort: &nbs p; <input type="password" name="Password" /><br /><br />';
- echo 'Passwort wiederholen: <input type="password" name="Password2" /><br /><br />';
- echo 'Geburtsdatum: &n bsp; <input type="text" name="birthday" /><br /><br />';
- echo 'E-mail Adresse: &n bsp; &nbs p;<input type="text" name="mail" /><br />';
- echo '<input type="submit" name="submit" value="Registrieren" />';
- echo '</form>';
- echo $error;
- ?>
Und jez zu meiner Frage:
Also wenn ich den Server Starte bzw. den World Server kommt diese Fehler Meldung:
Marc