Registration page needs a look over menu

User Tag List

Results 1 to 2 of 2
  1. #1
    randomblame's Avatar Member
    Reputation
    1
    Join Date
    Aug 2008
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Registration page needs a look over

    Hello all, I've been working on my server for quite a bit now and I'm down to getting the finishing touches in order aka the account registration page. As I do not wish to manually enter account info everytime a guildie wants to join my server this is something I need. I have played with about 6 templates I've found online for this very purpose and cleaned them all up in dreamweaver. Yet I cannot get any to function properly. This page is the best out of all of my attempts, I am including the code so somebody can slap me and show me why it's not working.

    INDEX.PHP
    ________________________________________________________________


    <?php
    include 'config.php';


    error_reporting(E_ALL ^ E_NOTICE);

    session_start();

    $msg = Array();
    $error = Array();

    function addUser(){
    if (empty($_POST)) return false;
    global $config, $msg, $error;
    // Check if this IP has more than the accounts per IP limit
    $ip = $_SERVER['REMOTE_ADDR'];
    $db = @mysql_connect($config['mysql_host'], $config['mysql_user'], $config['mysql_pass']);
    if (!$db) return $error[] = 'Database: '.mysql_error();
    if (!@mysql_select_db($config['mysql_dbname'], $db)) return $error[] = 'Database: '.mysql_error();

    $UserCheck = mysql_query("SELECT * FROM accounts WHERE lastip = '$ip'");
    if (mysql_num_rows($UserCheck) >= $config['MaxIPs']) return $error[] = '<font size=2 face=Tahoma><br /><b> You have reached your maximum amount of accounts</b></font>';

    if (empty($_POST['login'])) $error[] = 'Error, You forgot to enter a account name!';
    if (empty($_POST['password'][0]) || empty($_POST['password'][1])) $error[] = 'Error, You forgot to enter a password!';
    if ($_POST['password'][0] !== $_POST['password'][1]) $error[] = 'Password does not match!';
    if (!empty($error)) return false;
    $db = @mysql_connect($config['mysql_host'], $config['mysql_user'], $config['mysql_pass']);
    if (!$db) return $error[] = 'Database: '.mysql_error();
    if (!@mysql_select_db($config['mysql_dbname'], $db)) return $error[] = 'Database: '.mysql_error();
    $encrypted_password = sha1($_POST['password'][1]);
    $query = "SELECT `acct` FROM `accounts` WHERE `login` = '".mysql_real_escape_string($_POST['login'])."'";
    $res = mysql_query($query, $db);
    if (!$res) return $error[] = 'Database: '.mysql_error();
    if (mysql_num_rows($res) > 0) return $error[] = 'Username already in use. Be Creative!';

    $query = "INSERT INTO `accounts` (`login`, `encrypted_password`,`lastip`, `email`, `flags`) VALUES ('".mysql_real_escape_string($_POST['login'])."', '$encrypted_password', '".$_SERVER['REMOTE_ADDR']."','".mysql_real_escape_string($_POST['email'])."','".mysql_real_escape_string($_POST['tbc'][0])."')";

    $res = mysql_query($query, $db);
    if (!$res) return $error[] = 'Database: '.mysql_error();
    $msg[] = 'The Account <span style="color:#00FF00"><strong>'.htmlentities($_POST['login']).'</strong></span> has been created!<br>Allow 5 to 10 Minutes For The Server To Update.';
    mysql_close($db);
    return true;
    }
    {
    addUser();
    }

    ?>


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

    <HTML LANG="EN-US">

    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=iso-8859-1">


    </HTML>
    <?php include('style.css'); ?>
    <!--[if lt IE 7.]>
    <script defer type="text/javascript" src="pngfix.js"></script>
    <![endif]-->
    </head>
    <body>

    <div align="center">
    <div style="width:300px">
    <form action="<?php echo $_SERVER['file:///C|/Users/Ferocious/Desktop/PHP_SELF']; ?>" method="POST">
    <!-- <br>s for visual appearl do not remove-->
    <br><br><br><br><Br><Br><br><br><br><br>
    <table width="100%" border="0" cellspacing="1" cellpadding="3">
    <tr class="head"><th colspan="2">Account Creation</th></tr>
    <tr>
    <th>Username: </th><td align="center"><input class="button" type="text" name="login" size="30" maxlength="16"></td>
    </tr>
    <tr>
    <th>Password: </th><td align="center"><input class="button" type="password" name="password[]" size="30" maxlength="16"></td>
    </tr>
    <tr>
    <th>Retype Password: </th><td align="center"><input class="button" type="password" name="password[]" size="30" maxlength="16"></td>
    </tr>

    </div>

    <th>Account Type:</th><td align="center">
    <select name="tbc" type="select">
    <option value="0">Normal</option>
    <option selected value="8">Burning Crusade</option>
    </select></td>




    </table>
    <input type="button" class="button" value="Back" onClick="history.go(-1)" >
    <input type="submit" value="Submit" class="button">
    </form>

    <?php
    if (!empty($error)){
    echo '<table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td class="error" align="center">';
    foreach($error as $text)
    echo $text.'</br>';
    echo '</td></tr></table>';
    };
    if (!empty($msg)){
    echo '<table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td align="center">';
    foreach($msg as $text)
    echo $text.'</br>';
    echo '</td></tr></table>';
    exit();
    };
    ?>

    </div>
    </center>

    </table>
    <div align="center">
    <p id="done" style="width: 220px; font-weight: bold; color: #29b503; font-family: tahoma, arial, sans; font-size: 13px;">
    <span class="style1">Realmlist:</span><br >

    <span class="style2"><style type="text/css"> p.white </style>Set Realmlist <?php echo "$RealmIP"; ?></span><br >
    <br >
    <span class="style1">Accepted Client(s):</span><br >
    <span class="style2"><style type="text/css"> p.white </style><?php echo "$AcceptedPatch"; ?></span><br >
    </div>
    </body>
    </html>
    ________________________________________________________________

    Config.php
    ________________________________________________________________

    <?php
    $config['mysql_host'] = 'wowbox.servegame.org'; //MySQL Host Address
    $config['mysql_user'] = 'root'; //MySQL Username
    $config['mysql_pass'] = ''; //MySQL Password
    $config['mysql_dbname'] = 'logon'; //Logon Database Where The Accounts Stuff Resides usually logon
    $config['MaxIPs'] = '3'; //Set this to the allowed MAX accounts Per IP Address
    $RealmIP = 'wowbox.servegame.org'; //Set this to the IP address of your realm server.
    $AcceptedPatch = '2.4.3'; //Accpeted Patch means the Client patch number that the server allows to connect
    ?>



    _________________________________________________________________







    When you click the submit button it just sends you off to a white page the address bar shows the same address and no changes to the database occur.

    I am running my database through wamp, wamp is running during these tests *duh* and I am serving the page through iis7 because apache doesnt seem to get along with php5 and vista 64. I have tried using the page via firefox 3, ie7, and ie8 beta with no success.

    Please pummel me with the club of knowledge and call me a newb already...
    Last edited by randomblame; 10-15-2008 at 03:37 AM.

    Registration page needs a look over
  2. #2
    randomblame's Avatar Member
    Reputation
    1
    Join Date
    Aug 2008
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    here is the original which did not work either. I am running the latest build of arcemu, All of my ports are forwarded properly as well.

    http://wowbox.servegame.org/acs.zip

Similar Threads

  1. [Misc] I need help in Registration page
    By trichko88 in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 01-15-2011, 11:09 AM
  2. [Request] I need a 3.3.2 Mangos Registration Page that is working.
    By viperman67 in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 04-19-2010, 03:36 PM
  3. [Help]Need an expert to look over script
    By Muruk in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 06-16-2008, 11:11 PM
  4. Acc Registration Page -HELP PLEASE-
    By Ryanmax59 in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 12-18-2007, 04:17 AM
  5. You may need to check your registration page
    By ApeXz in forum Suggestions
    Replies: 5
    Last Post: 07-28-2007, 01:18 PM
All times are GMT -5. The time now is 02:48 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search