Ac web website (infinity accounts with a email) menu

User Tag List

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

    Ac web website (infinity accounts with a email)

    Hello!
    I got a website from Ac Web Ultimate repack. But if I create an account on the Account Creation page I can use a email-addres how many times I want. How can I change this so people only can use his/her email 1 time?


    Ac web website (infinity accounts with a email)
  2. #2
    Vindicated's Avatar Contributor
    Reputation
    226
    Join Date
    Aug 2008
    Posts
    1,067
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Create an if then statement.

    if SELECT FROM accounts WHERE email = "POST_EMAIL"; = true then
    echo "There is already an account with this email"
    else
    <account creation stuff here>
    end

    I'm not that great with PHP though :/
    The SQL statement will need fixing but thats the basic structure.


  3. #3
    zimonken's Avatar Member
    Reputation
    2
    Join Date
    Dec 2008
    Posts
    161
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Should I make:
    if SELECT FROM accounts WHERE email = "POST_EMAIL"; = true then
    echo "There is already an account with this email"
    else
    <account creation stuff here>
    end
    to a SQL file and execute it in my database or should I put this in my php file?
    And what should I change?

  4. #4
    zimonken's Avatar Member
    Reputation
    2
    Join Date
    Dec 2008
    Posts
    161
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is my Account register php file:

    <?php

    #################
    # #
    # #
    # Enjoy! #
    # #
    # #
    #################

    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;
    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($_POST['email'])) $error[] = 'Please fill in a valid email adress!';
    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();
    $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.';
    $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'])."', '24')";
    $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!';
    mysql_close($db);
    return true;
    }
    {
    addUser();
    }

    ?>


    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head>
    <title>Account Creation Page</title>
    <meta http-equiv="Pragma" content="no-cache"/>
    <meta http-equiv="Cache-Control" content="no-cache"/>
    <style type="text/css" media="screen">@import url(server_stats.css);</style>
    <!--[if lt IE 7.]>
    <script defer type="text/javascript" src="pngfix.js"></script>
    <![endif]-->
    </head>
    <body>
    <center>
    <div class="logo"></div>
    <div style="width:300px">
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
    <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>
    <tr>
    <th>E-mail: </th><td align="center"><input class="button" type="text" name="email" size="30" maxlength="30"/></td>
    </tr>
    </table>
    <input type="button" class="button" value="Back" onClick="history.go(-1)" />
    <input type="submit" value="Create" 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>
    </body>
    </html>

Similar Threads

  1. Replies: 0
    Last Post: 07-28-2016, 09:15 PM
  2. [Selling] ELDER SCROLLS ONLINE beta ACCOUNT with FULL EMAIL ACCESS included!
    By eaSTS9 in forum General MMO Buy Sell Trade
    Replies: 2
    Last Post: 01-10-2014, 05:45 AM
  3. [Buying] Wildstar Account With The Email. $150
    By talktobrandon in forum Members Only Accounts And CD Keys Buy Sell
    Replies: 0
    Last Post: 07-04-2013, 11:24 AM
  4. [Help] Website creates accounts with acct 0?
    By chanceless in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 02-14-2009, 03:04 PM
All times are GMT -5. The time now is 03:53 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search