[help] Registration

Results 1 to 6 of 6
  1. #1
    Account Upgraded | Title Enabled! kalo93 is offline
    MemberRank
    Jan 2007 Join Date
    At your door.Location
    409Posts

    [help] Registration

    Hello, i used this registration form:
    [php]
    <html>
    <head>
    <title>Serenety Gunz - Registration</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 = "serenetygunz.no-ip.biz";
    $srvport = "6000";
    $mssql_user = "";
    $mssql_pass = "";
    $mssql_database = "GunzDB";
    $mssql_host = "HOME-KVH92QTYTG\SQLEXPRESS";
    $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="#">DarkGamers Gunz Registration</A></CENTER></td>
    </tr>
    <tr>
    <td style="border-left: 1px solid #003300">&nbsp;Login ID:</td>
    <td style="border-right: 1px solid #003300"><input type="text" name="login"&nbsp;></td>
    </tr>
    <tr>
    <td style="border-left: 1px solid #003300">&nbsp;Password:</td>
    <td style="border-right: 1px solid #003300"><INPUT TYPE="password" NAME="senha1">&nbsp;</td>
    </tr>
    <tr>
    <td style="border-left: 1px solid #003300">&nbsp;Confirm Password:&nbsp;</td>
    <td style="border-right: 1px solid #003300"><INPUT TYPE="password" NAME="senha2">&nbsp;</td>
    </tr>
    <tr>
    <td style="border-left: 1px solid #003300">&nbsp;E-mail:</td>
    <td style="border-right: 1px solid #003300"><INPUT TYPE="text" NAME="email">&nbsp;</td>
    </tr>
    <tr>
    <td style="border: 1px solid #003300; border-top: 0px;" colspan=2><CENTER><INPUT NAME="Cadastrar" VALUE="Register!" 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 ":: Error occured! Please try again later. ::<br>";
    }
    else
    {
    echo ":: Congratulations! The registration had completed successfully! ::<br>";
    }
    }
    else
    {
    echo ":: E-mail in use. ::<br>";
    }
    }
    else
    {
    echo ":: Login ID in use, please try again. ::<br>";
    }
    }
    else
    {
    echo ":: Invalid E-mail. ::<br>";
    }
    }
    else
    {
    echo ":: Only use NUMBERS and LETTERS in Login ID! ::<br>";
    }
    }
    else
    {
    echo ":: The Password you typed DOESN't MATCH! ::<br>";
    }
    }
    }
    $query = mssql_query("SELECT * FROM Accounts");
    $num_rows = mssql_num_rows($query);
    echo "Total Accounts: ".$num_rows."<br>";
    echo "<br><B>Serenety Gunz is:</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
    Last edited by kalo93; 17-06-07 at 05:37 PM. Reason: Adding tags


  2. #2
    The beer?? Its here !!! Rotana is offline
    MemberRank
    Jan 2007 Join Date
    The NetherlandsLocation
    1,733Posts

    Re: [help] Registration

    You have hosted it on an external server..
    Then its almost impossible to connect to the mssql server on your pc. Only possible when you have mssql server enterprice or workgroup edition.

  3. #3
    Alpha Member WGFreak is offline
    MemberRank
    Jun 2007 Join Date
    Planet Earth.Location
    1,469Posts

    Re: [help] Registration

    Rotana, you are wrong
    click on your wamp icon > php settings > PhP extensions > tick Mssql

  4. #4
    The beer?? Its here !!! Rotana is offline
    MemberRank
    Jan 2007 Join Date
    The NetherlandsLocation
    1,733Posts

    Re: [help] Registration

    Damm i'm not wrong awardspace.com look there its an hosting provider.

    and his page serenetygunzstatus.awardspace.com is hosted there.

  5. #5
    Account Upgraded | Title Enabled! kalo93 is offline
    MemberRank
    Jan 2007 Join Date
    At your door.Location
    409Posts

    Re: [help] Registration

    :S i dont get it

  6. #6
    Infraction Banned marcelinni is offline
    MemberRank
    Mar 2007 Join Date
    103Posts

    Re: [help] Registration

    k, i use server managmtn express, hence rotana is wrong, and btw, u need an sa and password.



Advertisement