problem with registration script

03/15/2012 22:23 said200#1
Good evening I have a problem with the registration script.
When I go on [Only registered and activated users can see links. Click Here To Register...]
he wrote:

( ! ) Fatal error: Call to undefined function mssql_connect() in C:\wamp\www\register.php on line 9
Call Stack
# Time Memory Function Location
1 0.0007 683416 {main}( ) ..\register.php:0

I used wamp server, my register.php :
PHP Code:
<?php 

    $host 
"5.108.3.228\\SQLEXPRESS"// your sql instance 
    
$user "sa"// username 
    
$pw "123456"// 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>
03/18/2012 15:21 dominicrode#2
rly fail ...

$host = "5.108.3.228\\SQLEXPRESS"; // your sql instance

is wrong ... not make u'r ip before \\SQLEXPRESS ... make u'r pc name there :)
03/19/2012 11:11 Xijezu#3
Quote:
Originally Posted by dominicrode View Post
rly fail ...

$host = "5.108.3.228\\SQLEXPRESS"; // your sql instance

is wrong ... not make u'r ip before \\SQLEXPRESS ... make u'r pc name there :)
The only fail here is your answer.
I mean, yes, this would cause an error, but NOT the error which he says.

Code:
( ! ) Fatal error: Call to undefined function mssql_connect() in C:\wamp\www\register.php on line 9
What does it says? The mssql_connect() function doesn't exist. What does this says? The .dll is missing.

Use the Sql Server Driver for PHP.