Xampp und php...

    Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

    • Werbung zur Unterstützung des Forums ( Bitte AddBlocker deaktivieren )

    • <title>Flyff Server ~ Registration Page</title>
      <body>
      <body background="bg1.jpg">
      <font face="Geneva, Arial, Helvetica, Sans-Serif">
      <font size="3">

      <?php
      ini_set('display_errors', 0);
      $connection = mssql_connect('xxx', 'xxx', 'xxx'); //Change YOURHOST and YOURPASSWORD

      if(!connection || !mssql_select_db('ACCOUNT_DBF', $connection))
      {
      die('Unable to connect or select database!');
      }

      $checkusername = $_POST['Username'];
      $query = mssql_query("SELECT account FROM ACCOUNT_TBL WHERE account = '$checkusername'");
      $result = mssql_fetch_row($query);

      if(isset($_POST['submit'])){
      if($_POST['Username'] == ""){
      $error = '<font color="red"><b>Please enter a username.</b></font>';
      }
      else if($result[0] == $checkusername){
      $error = '<font color="red"><b>This username already exists. Please choose another one.</b></font>';
      }
      else if($_POST['Password'] == ""){
      $error = '<font color="red"><b>Please enter a password.</b></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', $checkusername, SQLVARCHAR, false, false, 120);
      mssql_bind($stmt, '@email', $checkusername, 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"><b>Registration complete!</b></font>';
      }
      }

      echo '<form action="register.php" method="post">';
      echo 'Username:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="Username" /><br /><br />';
      echo 'Password:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="password" name="Password" /><br /><br />';
      echo '<input type="submit" name="submit" value="Register" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp';
      echo '</form>';
      echo $error;

      ?>


      Hoffe auf eine Lösung!