Php Registration for LOTF

Results 1 to 6 of 6
  1. #1
    Proficient Member Virtue~ is offline
    MemberRank
    Jul 2008 Join Date
    181Posts

    Php Registration for LOTF

    Well, steels was a bit messed up, and needed to be edited.

    So here the registration for all lotf users.
    Code:
    <?php
    include("config.php");
    ?>
    
    <?php
    $my_connection = mysql_connect($db['info']['host'], $db['info']['user'], $db['info']['pass']);
    $my_database = mysql_select_db($db['info']['name']);
    ?>
    <form action="?op=register" method="post">
      <br />
          <font color="#171717">___<font color=white>Username:
          <label>
            <input name="user" type="text" class="liteoption" id="user" size="15" maxlength="15" />
          </label>
        <input name="submit" type="submit" class="liteoption" value="Register" />
      </p>
    </form>
      <?php
    if(isset($_POST['submit'])) {
    if(!$_POST['user']) {
    die('<center><font color=red>You must fill in all of the feilds!</font></center> <BR>');
    }
    if(!get_magic_quotes_gpc()) {
    $user = addslashes($_POST['user']);
    $pass = md5($_POST['pass1']);
    } else {
    $user = $_POST['user'];
    $pass = md5($_POST['pass1']);
    }
    $pass2 = md5($_POST['pass2']);
    $check = mysql_query("SELECT * FROM accounts WHERE AccountID = '$user'");
    $check2 = mysql_num_rows($check);
    if($check2 != '0') {
    die("<center><font color=red>Username ".$user." already being used!</font></center>");
    }
    if($pass != $pass2) {
    die('Passwords dont match!');
    }
    
    $insert_member = mysql_query("INSERT INTO accounts (AccountID, LogonType) VALUES ('$user', '2')");
    if($insert_member) {
    echo("<p class='b01'><center><font color=green>Registration Complete! Login with any password!</font></center></p>");
    } else {
    echo("<p class='b01'><center><font color=red>Registration Failed!</font></center></p>" );
    }}
    ?>
    And config.php
    Code:
    <?php
    //==================================DataBase Information======================================
    
    $db['info']['user'] = "root"; //Your Username for MySQL
    $db['info']['pass'] = "PASSWORD"; //Your Password for MySQL
    $db['info']['host'] = "localhost"; //Your host
    $db['info']['name'] = "coproj"; //Your database name
    
    ?>
    The stuff above is default for lotf accept password

    Thanks to steel for having the base of the code :P

    Thanks me for making it lotf enabled :P
    Thanks IcedEarth for helping a bit

    -Virtue
    Last edited by Virtue~; 16-07-08 at 08:15 PM.


  2. #2
    C# Developer stealarcher is offline
    MemberRank
    Jan 2008 Join Date
    571Posts

    Re: Php Registration for LOTF

    ty for editing it ^^, nice release. Will stop a lot of questions hah

  3. #3
    Proficient Member XeroRecoil is offline
    MemberRank
    May 2007 Join Date
    In Hell Called HeavenLocation
    192Posts

    Re: Php Registration for LOTF

    Releasing my coding and changing stuff -.- how noobish

  4. #4
    Account Upgraded | Title Enabled! Korvacs is offline
    MemberRank
    Jan 2008 Join Date
    298Posts

    Re: Php Registration for LOTF

    Conquer passwords arnt MD5 Hashes, i beleive ive said this about 10 times now?

  5. #5
    Proficient Member XeroRecoil is offline
    MemberRank
    May 2007 Join Date
    In Hell Called HeavenLocation
    192Posts

    Re: Php Registration for LOTF

    lawl well they don't know it xD Im using an hash that works to be readed into server & accepted by serv xD

  6. #6
    Proficient Member Virtue~ is offline
    MemberRank
    Jul 2008 Join Date
    181Posts

    Re: Php Registration for LOTF

    Lawl, i now gave u creds :P



Advertisement