registration script

07/25/2011 11:59 lilnani#1
hello


can any one give me a good registration script and working i try this but didnt work

PHP 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) > && 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>
07/25/2011 12:51 rattexxl#2
ka warum du das jetzt aufmachst aber hier der link und es geht.

[Only registered and activated users can see links. Click Here To Register...]
07/25/2011 12:53 lilnani#3
i try it but didnt work
07/25/2011 20:25 wisp66#4
there is no simple registration script it all varies depending on set up what php version are you using? are you using xamp,wamp,iis,etc?
07/25/2011 20:35 lilnani#5
i using xamp and iis and appserv nothing work