[Help Me]How to fill in the registration script.

07/24/2011 18:51 said200#1
Hi,
I took the script registration I found this forum.
I completed a number of things but I'm not sure it's good.
Here's my script :
PHP Code:
<?php 

    $host 
"(local)\SQLEXPRESS"// your sql instance 
    
$user "sa"// username 
    
$pw ""// password 
    
$db "Auth"// db 
    
$md5_key "2011"// your md5 key 
     
    
$connect mssql_connect('(local)\SQLEXPRESS','sa',''
    or die(
"Can't connect to the datebase."); 
     
    
mssql_select_db('Auth','dbo.Accounts'
    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>
If is not good to tell me to do please