[HELP] Registration Script 8.1

12/18/2013 05:39 admin2rien#1
Hello,

I would like to have a script for the registration of players Rappelz Server 8.1
That's 4 days I research and test different script elitepvpers but without success.

Someone can help me to create a very basic script with Wamp to not always create myself through sql server.

This script not working
Code:
<?php

    $host = "(local)\\RappelzSQL"; // your sql instance
    $user = "sa"; // username
    $pw = ""; // password
    $db = "Auth"; // db
    $md5_key = "2011"; // your md5 key
    
    $connect = mssql_connect($host,$user,$pw)
    or die("Can't connect to the datebase.");
    
    mssql_select_db($db,$connect)
    or die("Can't select the datebase");

?>

<html>
  <head>
    <title>Register</title>
    <center>
    <h3 style="color:red">Rappelz : Register Page ( Pls insert more then 4 chars ! )</h3> 
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
      Username : <input type="text" size="20" name="username" /><br />
      Password : <input type="password" size="20" name="password" /><br /><br />
      <input type="submit" value="Register now !" name="senden" />
    </form>
    <?php
    
      $usr = $_POST['username'];
      $pass = $_POST['password'];
      $endPw = $md5_key . $pass;
      $md5 = md5($endPw);
      
      $results = mssql_query("SELECT * FROM dbo.Accounts WHERE '$usr' LIKE login_name");
      $res = mssql_num_rows($results);
      
      if(strlen($usr) > 4 && strlen($pass) > 4)
      {
          if($res > 0)
          {
              echo "Account Exists !";
          }
          else
          {
              mssql_query("INSERT INTO dbo.Accounts(login_name,password,block,withdraw_remain_time,age,auth_ok,pcbang,last_login_server_idx,event_code,result) VALUES('$usr','$md5',0,0,18,1,1,1,0,1)");
              echo "Registration Success !";
          }
      }
      else
      {
          echo "Username or Password to small...";
      }
    
    ?>
    </center>
  </head>
</html>
Preferably without ISS or ASP because all the ones I tested were unsuccessful.

Thank you in advance
12/18/2013 13:06 ThunderNikk#2
The ISS ASP script in the tools and guides collection at the top of the page works fine for me, no issues.

If that one does not work for you ismokedrow has a PHP one linked in their signature...

[Only registered and activated users can see links. Click Here To Register...]

Good Luck and please use the help thread to post questions...

[Only registered and activated users can see links. Click Here To Register...]
12/18/2013 16:25 admin2rien#3
Quote:
Originally Posted by thndr View Post
The ISS ASP script in the tools and guides collection at the top of the page works fine for me, no issues.

If that one does not work for you ismokedrow has a PHP one linked in their signature...

[Only registered and activated users can see links. Click Here To Register...]

Good Luck and please use the help thread to post questions...

[Only registered and activated users can see links. Click Here To Register...]
Thank you for your help Thndr but this script has already been tried before to create my help topic.

I followed the tutorial and I install:

- PHP 3.0 + Driver (SQLSRV)
- Webmatrix

Configure vu.php, config.php, register.php

[Only registered and activated users can see links. Click Here To Register...]

Are what I'm still missing something or a step that I have not done?
Someone will have a solution for me so I can try please? Thank you in advance
12/18/2013 21:37 ismokedrow#4
It is saying that SQLSRV_ is not enabled, you must have PHP 5.3+ installed and the appropriate PHP Driver 3.0 installed (there are different versions of Microsoft PHP Drive per version of PHP) So make sure to get the version appropriate to your PHP install.