Welcome to the RaGEZONE - MMORPG development forums.

[TUT.] Creating a Register PAGE (WORK 100%)

This is a discussion on [TUT.] Creating a Register PAGE (WORK 100%) within the Gunz Releases forums, part of the Gunz Online category; Originaly posted until the 11 in TOPPIC: http://forum.ragezone.com/gunz-onlin...rs-206502.html ............................... Q. 2.2 How to make a register website? A. <version 2.1, ...

Page 1 of 10 123456789 ... LastLast
Results 1 to 15 of 140
  1. #1
    Member
    Rank
    Member
    Join Date
    Jan 2007
    Posts
    60
    Liked
    1

    Smile [TUT.] Creating a Register PAGE (WORK 100%)

    Originaly posted until the 11 in TOPPIC:
    http://forum.ragezone.com/gunz-onlin...rs-206502.html
    ...............................
    Q.
    2.2 How to make a register website?
    A.
    <version 2.1, credits to: Kentucky & snaity>
    1) Download wamp. (wamp allows to run a website on your computer. a = apache)


    Code:
    http://optusnet.dl.sourceforge.net/s...amp5_1.6.6.exe
    2) Install it.
    Click:
    Next >
    I Accept -> Next >
    Install to "c:\wamp"
    Next >
    Next >
    Next >
    Install

    3) It will now Install, click ok with each popup that comes up.

    4) Click Launch WAMP now, then click OK.

    5) Go to:


    Code:
    C:\wamp\php\php.ini
    6) Find the line ";extension=php_mssql.dll" and remove the ;

    7) Click the WAMP icon then click "Put Online"

    8) Go to c:\wamp\www and delete everything in there.

    9) Right Click -> New -> File -> index.php

    10) Right Click index.php -> Open With -> Notepad
    11) Copy In: ( read // in the CODE)

    [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 = "YOUR_IP"; // YOUR IP here ----- Seu IP aqui
    $srvport = "6000"; // PORT, default is 6000 ---- Porta, padr
    Last edited by lwirkk; 05-06-07 at 08:00 AM. Reason: Have error?

  2. #2
    Part of the hard
    Rank
    Member +
    Join Date
    Oct 2005
    Location
    Ze Netherlands
    Posts
    503
    Liked
    0
    Gamertag: Alphaverb
    let's try this.
    I'll edit this with the result

    EDIT:

    Can't try it without a php.ini xD
    Last edited by Ulti; 07-01-07 at 12:03 AM.

  3. #3
    Account Upgraded | Title Enabled!
    Rank
    Member +
    Join Date
    Nov 2006
    Location
    The Netherlands
    Posts
    401
    Liked
    1
    Great job lwirkk,
    I will edit the "register page tutorial" in the questions & awnsers post. Offcourse credits will be given to you for this excelent job.

    grtz,

    Bepetemish


    ps. I wait with editing until Ulti posted the results.

  4. #4
    Member
    Rank
    Member
    Join Date
    Jan 2007
    Posts
    60
    Liked
    1

    Smile

    Thanx to all^^...

    any doubt, pole that I will make the maximum to help. ^^

  5. #5
    Part of the hard
    Rank
    Member +
    Join Date
    Oct 2005
    Location
    Ze Netherlands
    Posts
    503
    Liked
    0
    Gamertag: Alphaverb
    I have lost my php.ini and now i need a new one.
    My own one is fucked up so can anyone upload a fresh/working one?

  6. #6
    Member
    Rank
    Member
    Join Date
    Jan 2007
    Posts
    60
    Liked
    1

    Smile

    Quote Originally Posted by Ulti View Post
    I have lost my php.ini and now i need a new one.
    My own one is fucked up so can anyone upload a fresh/working one?
    http://www.host.uniextreme.com/etc/gunz/php.ini

  7. #7
    RageZ Hell
    Rank
    Member +
    Join Date
    Nov 2006
    Location
    Estonia
    Posts
    716
    Liked
    0
    i did all what in tut but
    Fatal error: Call to undefined function mssql_connect() in C:\wamp\www\index.php on line 47

    what i msut do?


    this is line 47

    $conn = mssql_connect($mssql_host, $mssql_user, $mssql_pass);
    Last edited by kekku500; 07-01-07 at 12:46 AM.

  8. #8
    Ultimate Member
    Rank
    Member
    Join Date
    Aug 2006
    Posts
    184
    Liked
    1
    enable msql in php.ini

  9. #9
    ~Lord of Banana-RO~
    Rank
    Member +
    Join Date
    Aug 2006
    Location
    germany
    Posts
    362
    Liked
    0
    i have enable it and i have the same error

  10. #10
    RageZ Hell
    Rank
    Member +
    Join Date
    Nov 2006
    Location
    Estonia
    Posts
    716
    Liked
    0
    same i enable but same error!!!
    maybe i msut restart something???

  11. #11
    Hardcore Member
    Rank
    Member
    Join Date
    Aug 2006
    Posts
    113
    Liked
    0
    yeah i get that error too

  12. #12
    Member
    Rank
    Member
    Join Date
    Jan 2007
    Posts
    60
    Liked
    1
    Quote Originally Posted by kekku500 View Post
    i did all what in tut but
    Fatal error: Call to undefined function mssql_connect() in C:\wamp\www\index.php on line 47

    what i msut do?


    this is line 47
    put your PHP file (register) here.... thanx. ^^ .

  13. #13
    Hardcore Member
    Rank
    Member
    Join Date
    Aug 2006
    Posts
    113
    Liked
    0
    ok i will my code is
    <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 = "dothex.no-ip.org"; // YOUR IP here ----- Seu IP aqui
    $srvport = "6000"; // PORT, default is 6000 ---- Porta, padr&#227;o &#233; 6000
    $mssql_user = "sa"; // LEAVE BLANK if in SQL SERVER is WINDOWS AUTHENTICATION --- se em AUTHENTICATHION no SQL SERVER &#233; WINDOWS AUTHENTICATION
    $mssql_pass = "*******"; // LEAVE BLANK if in SQL SERVER is WINDOWS AUTHENTICATION --- se em AUTHENTICATHION no SQL SERVER &#233; WINDOWS AUTHENTICATION
    $mssql_database = "GunzDB"; // DATABASE of GUNZ you have created, deafult is GunzDB ---- Banco de Dados do Gunz que voc&#234; criou anteriormente, o padr&#227;o &#233; GunzDB
    $mssql_host = "DECLAN\SQLEXPRESS"; // 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">&nbsp;Login:</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;Senha:</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;Repetir Senha:&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;Email:</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="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&#225;lido ::<br>";
    }
    }
    else
    {
    echo ":: Use somente letras e n&#250;meros no LOGIN ::<br>";
    }
    }
    else
    {
    echo ":: Senhas est&#227;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&#231;&#227;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>

  14. #14
    Hardcore Member
    Rank
    Member
    Join Date
    Aug 2006
    Posts
    113
    Liked
    0
    sorry double post

  15. #15
    ~Lord of Banana-RO~
    Rank
    Member +
    Join Date
    Aug 2006
    Location
    germany
    Posts
    362
    Liked
    0
    i have it put into my www folder look here
    GunZ User Account Register

 

 
Page 1 of 10 123456789 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •