Registration Script

How am I dumb? I'm sharing knowledge. Even if you know what the stored procedure is called, you still have to find it and figure out its arguments. ;)

rofl'd ...

it's in the script...I'm the one that told him about it.. and made him do it that way..

---------- Post added at 01:23 AM ---------- Previous post was at 01:20 AM ----------

mssql_bind($stmt, '@account', $userRev, SQLVARCHAR, false, false, 15);
mssql_bind($stmt, '@password', $passRev, SQLVARCHAR, false, false, 36);
mssql_bind($stmt, '@birthday', $bday, SQLVARCHAR, false, false, 120);
mssql_bind($stmt, '@email', $email, SQLVARCHAR, false, false, 120);

the reasons why the script wasn't completely posted (some values were edited) so people have to use there minds... copy/paste and then using it without knowing anything, what makes every server that has public released files fail..eventually the game dies because there's thousands of servers out there... with the same thing.
 
Last edited:
Getting a bit pissy now are we? Look, RZ is about sharing knowledge yes?

I've just made it easier for people to figure it out. It's not spoon feeding because they've still got another huge task ahead of them, configuring/securing/managing the leaked server files.

Yes I've read your script over and see that you did indeed put the arguments there, my mistake.
 
Maybe you should try your work! ^_^

i put that under ur script but i have an error:

Parse error: syntax error, unexpected '}' in C:\wamp\www\done.php on line 73
 
Last edited:
Maybe you should try your work! ^_^

i put that under ur script but i have an error:

Parse error: syntax error, unexpected '}' in C:\wamp\www\done.php on line 73
Copy it again, when I was editing it for here I forgot to delete a }. Now it will work.


borkaman, you can use notepad..
 
PHP:
<?php
/* Copyright 2009 GamingSync & Aaron Roderigues */
$link = @mssql_connect("MY Host IP", "USERNAME", "PASSWORD") or die ("Server is down!");
$db = @mssql_select_db('ACCOUNT_DBF') or die ("Accout table is missing!");
function doesUsernameExist($name){
    $exit = FALSE;
    $result = @mssql_query("SELECT * FROM Accounttable.. WHERE account='$name'");
    if(mssql_num_rows($result) != 0){
        $exit = TRUE;
    }
    else{
        $exit = FALSE;
    }
    return $exit;
}
if(!isset($_POST['submit'])){
    print("");
}
else if(isset($_POST['submit'])){
    $userRev = preg_replace ("[^A-Za-z0-9]", "", $_POST['username']);
    $passRev = preg_replace ("[^A-Za-z0-9]", "", $_POST['password']);
    $day = (int) $_POST['day'];
    $month = (int) $_POST['month'];
    $year = (int) $_POST['year'];
    $email = $_POST['email'];
    if($_POST['username'] == ""){
        print("Please enter an username");
    }
    else if($_POST['email'] == ""){
        print("Please enter an email");
    }
    else if($_POST['password'] == ""){
        print("Please enter an password");
    }
    else if($day == "" || $month == "" || $year == "" || strlen($day) > 2 || strlen($month) > 2 || strlen($year) != 4 || $day == 00 || $month == 00 || $year == 0000){
        print("Please enter a correct birthday");
    }
    else if(strlen($_POST['username']) > 15){
        print("Your username cannot contain more than 15 characters");
    }
    else if(strlen($_POST['password']) > 36){
        print("Your password cannot contain more than 36 characters");
    }
    else if($_POST['username'] != $userRev){
        print("Your username contains illegal characters or words");
    }
    else if($_POST['password'] != $passRev){
        print("Your password contains illegal characters");
    }
    else if(strlen(filter_var($email, FILTER_VALIDATE_EMAIL)) == 0){ 
        print("Your is email is wrong please check it");
    }
    else {
        $userRev = strtolower($userRev);
        $passRev = strtolower($passRev);
        $bday = $month.'/'.$day.'/'.$year;
        $email = $_POST['email'];
        if(!doesUsernameExist($userRev)){
            $stmt = mssql_init('HEREBEINT', $link);
            mssql_bind($stmt, '@account', $userRev, SQLVARCHAR, false, false, 15);
            mssql_bind($stmt, '@password', $passRev, SQLVARCHAR, false, false, 36);
            mssql_bind($stmt, '@birthday', $bday, SQLVARCHAR, false, false, 120);
            mssql_bind($stmt, '@email', $email, SQLVARCHAR, false, false, 120);
            mssql_execute($stmt) or die ("Something is wrong on the execution");
            mssql_free_statement($stmt);
            print("<font color='black'>Thank you for registering with the name \"".$userRev."\".</font>");
        }
        else {
            print("Username is already taken");
        }
    }


function print($error){
    if($error != ""){
        echo $error;
    }
    form code here
}  

?>

IS this correct?? Because I got this error:

Parse error: syntax error, unexpected T_PRINT, expecting T_STRING in C:\wamp\www\done.php on line 74


I delte the all words Sign in printSign.. can u edit this to make it work? tnx 4 helping me!
 
Last edited:
Back