Account creation webpage menu

Shout-Out

User Tag List

Results 1 to 8 of 8
  1. #1
    barinar's Avatar
    barinar
    Guest

    Account creation webpage

    I made my account creation page using a lot of different templates.

    The only problem I'm having is that the flag value that gets put into the account database is 4 instead of 44 which I read is what it needs to be for WOTLK.

    Here's the code for the selection of account type:
    Code:
    <th>Account Type:</th><td align="center">
    <select name="tbc" type="select">
    <option value="8">TBC</option>
    <option selected value="44">WOTLK</option>
    </select></td>
    The template didn't even have the option thing on it so I added it.


    Here's the code for how it is used for the database:
    Code:
    $query = "INSERT INTO `accounts` (`login`,`password`,`lastip`, `email`, `flags`) 
    VALUES ('".mysql_real_escape_string($_POST['login'])."', 
    '".mysql_real_escape_string($_POST['password'][0])."', 
    '".$_SERVER['REMOTE_ADDR']."', 
    '".mysql_real_escape_string($_POST['email'])."', 
    '".mysql_real_escape_string($_POST['tbc'][0])."';
    Before I added the options, ".mysql_real_escape_string($_POST['tbc'][0])." was just "8" so all account were tbc automatically.

    So, why is it making "flag" equal to 4 instead of 44?

    Account creation webpage
  2. #2
    ReppzYouTube's Avatar Member CoreCoins Purchaser
    Reputation
    12
    Join Date
    Dec 2007
    Posts
    118
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yea i got same proberlem i thought it was a PHP error or somthing
    https://www.youtube.com/reppzgaming
    Best place on the web for Rogue PvP.

  3. #3
    pcrew's Avatar Member
    Reputation
    54
    Join Date
    Jun 2008
    Posts
    88
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try using "array" or "switch" instead

  4. #4
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Problem is with "mysql_real_escape_string($_POST['tbc'][0])"
    $_POST['tbc'] is the string containing that field's value; $_POST['tbc'][0] contains only the first character of that field.

  5. #5
    barinar's Avatar
    barinar
    Guest
    I fixed it yesterday, but you were right spidey.

    I changed the codes to:
    Code:
    $query = "INSERT INTO `accounts` (`login`,`password`,`lastip`, `email`, `flags`) VALUES ('".mysql_real_escape_string($_POST['login'])."', '".mysql_real_escape_string($_POST['password'][0])."', '".$_SERVER['REMOTE_ADDR']."', '".mysql_real_escape_string($_POST['email'])."', '".mysql_real_escape_string($_POST['flags'])."')"
    Select form:
    Code:
    <select name="flags" type="select">
    <option value="8">TBC</option>
    <option selected value="44">Wotlk</option>
    </select></td>
    Really the only significant change was taking out the [0](changed the name to flags, but that really didn't do anything at first)

  6. #6
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    mysql_real_escape_string($_POST['password'][0])

    Only takes the first character of the password. Not good

  7. #7
    barinar's Avatar
    barinar
    Guest
    The passwords in the database are full.

  8. #8
    bsod-staff14's Avatar Member
    Reputation
    35
    Join Date
    Nov 2008
    Posts
    443
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you need some help with this im good at it heres my yahoo: [email protected] or email me at: [email protected]
    Immortal GamerZ Under Development!

Similar Threads

  1. [How-To] [HTML, CSS, PHP, TrinityCore] Creating an Account Creation webpage for your Server
    By Valkryst in forum WoW EMU Guides & Tutorials
    Replies: 20
    Last Post: 05-21-2014, 01:11 PM
  2. Antrix Account Creation Homepage
    By imwiee in forum WoW EMU Guides & Tutorials
    Replies: 22
    Last Post: 10-20-2007, 04:55 PM
  3. Account Creation Site
    By Orlykthxbai in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 09-01-2007, 06:16 AM
All times are GMT -5. The time now is 06:16 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