Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Need help | Register page!

Newbie Spellweaver
Joined
Jul 12, 2006
Messages
17
Reaction score
0
yess i know many ppl asked about it...but i realy need this help !!!
i used all the "fixing filed" and its not working..
iam using Windows Aouth. so i have no User Name And Psasword..

heres my code plz help me:

PHP:
<html> 
<head> 
<title>GunZ User Account Register</title> 
<style> 
body { 
    color: #003300; 
    font-family: Verdana, Arial, Serif; 
    font-size: 10pt; 
} 
input { 
    border: 1px solid #003300; 
    color: #003300; 
    background: #DDDDDD; 
    font-family: Verdana, Arial, Serif; 
    font-size: 10pt; 
} 
tr { 
    font-size: 10pt; 
} 
a:link { 
    text-decoration: none; 
    color: #003300; 
} 
a:visited { 
    text-decoration: none; 
    color: #003300; 
} 
a:active { 
    text-decoration: none; 
    color: #003300; 
} 
a:hover { 
    text-decoration: none; 
    color: #FF6600; 
} 
</style> 
</head> 
<body> 
<div align="center"> 
<?php 
$srvip = "bomber-gunz.no-ip.info";    // YOUR IP here  ----- Seu IP aqui 
$srvport = "6000";    // PORT, default is 6000 ---- Porta, padr?o ? 6000 
$mssql_user = "";    // LEAVE BLANK  if in SQL SERVER is WINDOWS AUTHENTICATION    --- se em AUTHENTICATHION no SQL SERVER ? WINDOWS AUTHENTICATION 
$mssql_pass = "";   // LEAVE BLANK  if in SQL SERVER is WINDOWS AUTHENTICATION    --- se em AUTHENTICATHION no SQL SERVER ? WINDOWS AUTHENTICATION 
$mssql_database = "GunzDB";   // DATABASE of GUNZ you have created, deafult is GunzDB   ----  Banco de Dados do Gunz que voc? criou anteriormente, o padr?o ? GunzDB 
$mssql_host = "DDI-YCQW26USLNB";     // Host MSSQL in SQL SERVER, or SERVER NAME in SQL SERVER  ---- Nome do HOST MSSQL no SQL SERVER, ou o Nome do SERVER no SQL SERVER 
$conn = mssql_connect($mssql_host, $mssql_user, $mssql_pass); 
mssql_select_db($mssql_database); 
?> 
<FORM METHOD=POST ACTION="<?php echo $_SERVER['PHP_SELF']; ?>?act=register"> 
<table cellspacing=0 border=0> 
<tr> 
<td colspan=2 style="border: 1px solid #003300; background: #DDDDDD;"><CENTER><A HREF="#">Gunz - Games Extreme Servers</A></CENTER></td> 
</tr> 
<tr> 
<td style="border-left: 1px solid #003300"> Login:</td> 
<td style="border-right: 1px solid #003300"><INPUT TYPE="text" NAME="login" ></td> 
</tr> 
<tr> 
<td style="border-left: 1px solid #003300"> Senha:</td> 
<td style="border-right: 1px solid #003300"><INPUT TYPE="password" NAME="senha1"> </td> 
</tr> 
<tr> 
<td style="border-left: 1px solid #003300"> Repetir Senha: </td> 
<td style="border-right: 1px solid #003300"><INPUT TYPE="password" NAME="senha2"> </td> 
</tr> 
<tr> 
<td style="border-left: 1px solid #003300"> Email:</td> 
<td style="border-right: 1px solid #003300"><INPUT TYPE="text" NAME="email"> </td> 
</tr> 
<tr> 
<td style="border: 1px solid #003300; border-top: 0px;" colspan=2><CENTER><INPUT NAME="Cadastrar" VALUE="Cadastrar" TYPE="submit"></CENTER></td> 
</tr> 
</table> 
</FORM> 
<?php 
if ($_GET['act'] == 'register') 
{ 
    $user = anti_injection($_POST['login']); 
    $pass1 = anti_injection($_POST['senha1']); 
    $pass2 = anti_injection($_POST['senha2']); 
    $email = anti_injection($_POST['email']); 
    if (valida(Array($user,$pass1,$pass2,$email)) == true) 
    { 
        if ($pass1 == $pass2) 
        { 
            if (ereg("([0-9,a-z,A-Z])", $user)) 
            { 
                if (ereg("^([0-9,a-z,A-Z]+)([.,_]([0-9,a-z,A-Z]+))*[@]([0-9,a-z,A-Z]+)([.,_,-]([0-9,a-z,A-Z]+))*[.]([0-9,a-z,A-Z]){2}([0-9,a-z,A-Z])?$", $email)) 
                { 
                    $query = mssql_query("SELECT * FROM Accounts WHERE UserID='$user'"); 
                    $num_rows = mssql_num_rows($query); 
                    if ($num_rows == 0) 
                    { 
                        $query = mssql_query("SELECT * FROM Accounts WHERE E_Mail='$email'"); 
                        $num_rows = mssql_num_rows($query); 
                        if ($num_rows == 0) 
                        { 
                            $query = mssql_query("INSERT INTO Accounts (UserID, Password, E_Mail) VALUES ('$user','$pass1','$email')"); 
                            if (!$query) 
                            { 
                                echo ":: Erro, tente novamente mais tarde ::<br>"; 
                            } 
                            else 
                            { 
                                echo ":: Conta Registrada com Sucesso ::<br>"; 
                            } 
                        } 
                        else 
                        { 
                            echo ":: Email em uso ::<br>"; 
                        } 
                    } 
                    else 
                    { 
                        echo ":: Usuario em uso ::<br>"; 
                    } 
                } 
                else 
                { 
                    echo ":: Email Inv?lido ::<br>"; 
                } 
            } 
            else 
            { 
                echo ":: Use somente letras e n?meros no LOGIN ::<br>"; 
            } 
        } 
        else 
        { 
            echo ":: Senhas est?o diferenciadas ::<br>"; 
        } 
    } 
} 
$query = mssql_query("SELECT * FROM Accounts"); 
$num_rows = mssql_num_rows($query); 
echo "Total Accounts: ".$num_rows."<br>"; 
echo "<br><B>Status do Servidor:</B> "; 
$fp = @fsockopen($srvip, $srvport, $errno, $errstr, 1); 
if (!$fp) { 
    echo "<font style='color: #FF3300'><B>Offline</B></font></br>"; 
} else { 
    echo "<font style='color: #009933'><B>Online</B></font></br>"; 
    fclose($fp); 
} 
// Fun??o Anti Injection 
function anti_injection($sql) 
{ 
$sql = preg_replace(sql_regcase("/(from|select|insert|delete|where|drop table|show tables|#|\*|--|\\\\)/"),"",$sql); 
$sql = trim($sql); 
$sql = strip_tags($sql); 
$sql = addslashes($sql); 
return $sql; 
} 
// Verificar Campos Vazios 
function valida($campos){ 
  foreach($campos as $c){ 
      if(empty($c)){ 
        echo ":: Preencha todos os campos ::<br>"; 
        return false; 
      }else{ 
        return true; 
      } 
  } 
} 
?> 
</div> 
</body> 
</html>

plzz help me!!!

(and yes i checked the php_mssql and removed the ; and stuff...well i did everything to fix that..and its still gives me erors..)

ooh and heres a pic. of the eror:
darkheman - Need help | Register page! - RaGEZONE Forums
 
Newbie Spellweaver
Joined
Dec 28, 2006
Messages
65
Reaction score
0
your missing your user name and password

and u forgot to remove the ;

and u didnt replace the dll
 
Last edited:
Upvote 0
Newbie Spellweaver
Joined
Jul 12, 2006
Messages
17
Reaction score
0
i did it alll!!!
and iam not using User Name And Password!!!
iam using Windows Aouth.!!!
 
Upvote 0
Newbie Spellweaver
Joined
Jan 23, 2007
Messages
28
Reaction score
0
I understand this problem, but perhaps your PHP in your web server does not support MSSQL Queries.
Try getting the latest version of PHP for your HTTP Server.
Or if you are just using some host provider, just send a complaint although it never works.
Also, it's better to host it on your own if your are not hosting it yourself.

I am also using Windows Authentication with no Username and/or Password.
Lucky for you that it even tries to execute the PHP, I can't see the whole page my Apache is so screwed up. :p
 
Last edited:
Upvote 0
Back
Top