[HELP] Registration and Login problem

Results 1 to 4 of 4
  1. #1
    Apprentice 09491594764 is offline
    MemberRank
    Apr 2014 Join Date
    5Posts

    [HELP] Registration and Login problem

    When i downloaded someone's website here in FlyFF Forum. I can register and log in my newly-created,web registered account in my web. BUT when i used it in my game, i can't LOG IN.

    I tried to put my Admin Account in my own FlyFF Website .. but... it doesn't work... i used [patom]+password , ... how can i change the salt hashing in my website? so that when my friends create account. it will work in my game. TIA

    Here's my Registration.php content (sorry i don't know how to spoiler)

    <?php include('inc/header.php'); ?> <h1 id="Heading">Ingame Registration</h1>
    <?php
    if(!isset($_POST['reg_username'])) $_POST['reg_username'] = '';
    if(!isset($_POST['reg_email'])) $_POST['reg_email'] = '';

    odbc_exec($mssql, 'USE [ACCOUNT_DBF]');
    $checkacc = odbc_exec($mssql, 'SELECT COUNT(*) as count FROM [ACCOUNT_TBL] WHERE account=\''.mssql_escape_string($_POST['reg_username']).'\'');
    $checkmail = odbc_exec($mssql, 'SELECT COUNT(*) as count FROM [ACCOUNT_TBL_DETAIL] WHERE email=\''.mssql_escape_string($_POST['reg_email']).'\'');
    $errors = array();
    if(empty($_POST['reg_username']) || empty($_POST['reg_password']) || empty($_POST['reg_confirmpw']) || empty($_POST['reg_email']) || empty($_POST['reg_captcha']))
    $errors[] = 'You must fill in all fields!';
    if(!empty($_POST['reg_username']) && odbc_result($checkacc, 'count') > 0)
    $errors[] = 'The username already exists!';
    if(!empty($_POST['reg_email']) && odbc_result($checkmail, 'count') > 0)
    $errors[] = 'The e-mail address already exists!';
    if(!empty($_POST['reg_username']) && (strlen($_POST['reg_username']) > 10 || strlen($_POST['reg_username']) < 4))
    $errors[] = 'Your username must be 4 - 10 characters included!';
    if(!empty($_POST['reg_password']) && (strlen($_POST['reg_password']) > 12 || strlen($_POST['reg_password']) < 6))
    $errors[] = 'Your password must be 6 - 12 characters included!';
    if((!empty($_POST['reg_password']) && !empty($_POST['reg_confirmpw'])) && $_POST['reg_password'] != $_POST['reg_confirmpw'])
    $errors[] = 'Repeat your password is wrong!';
    if(!empty($_POST['reg_email']) && !preg_match('/^[a-zA-Z0-9-_.]+@[a-zA-Z0-9-_.]+\.[a-zA-Z]{2,4}$/', $_POST['reg_email']))
    $errors[] = 'The e-mail address is not valid';
    if(!empty($_POST['reg_captcha']) && md5($_POST['reg_captcha']) != $_SESSION['captcha'])
    $errors[] = 'The captcha is entered incorrectly!';
    if(empty($_POST['reg_rules']))
    $errors[] = 'You have to have read the rules and accept!';

    if(isset($_POST['reg_submit'])) {
    if(count($errors) > 0) {
    echo '<div class="fail">';
    foreach($errors as $error) {
    echo $error.'<br/>';
    }
    echo '</div>';
    } else {
    odbc_exec($mssql, 'INSERT INTO [dbo].[ACCOUNT_TBL] (account, password, isuse, member, id_no1, id_no2, realname, reload, OldPassword, TempPassword, cash , votepoints) VALUES (N\''.mssql_escape_string($_POST['reg_username']).'\', N\''.mssql_escape_string(md5($_CONFIG['pwdsalt'].$_POST['reg_password'])).'\', N\'T\', N\'A\', NULL, 0, N\'P\', NULL, 0, NULL, 0, 0)');
    odbc_exec($mssql, 'INSERT INTO [dbo].[ACCOUNT_TBL_DETAIL] (account, gamecode, tester, m_chLoginAuthority, regdate, BlockTime, EndTime, WebTime, isuse, secession, email) VALUES (N\''.mssql_escape_string($_POST['reg_username']).'\', N\'A000\', N\'2\', N\'F\', \''.mssql_escape_string(date('Ymd H:i:s')).'\', N\'20010101\', N\'20990101\', N\'20050101\', N\'O\', NULL, N\''.mssql_escape_string($_POST['reg_email']).'\')');
    echo '<div class="success">Your account has been created!</div>';
    }
    }
    ?>
    <form method="post">
    <table>
    <tr>
    <td>Username:</td>
    <td><input class="Input_Text" type="text" name="reg_username" maxlength="10" /></td>
    </tr>
    <tr>
    <td>Password:</td>
    <td><input class="Input_Text" type="password" name="reg_password" maxlength="11" /></td>
    </tr>
    <tr>
    <td>Repeat Password:</td>
    <td><input class="Input_Text" type="password" name="reg_confirmpw" /></td>
    </tr>
    <tr>
    <td>E-Mail Address:</td>
    <td><input class="Input_Text" type="text" name="reg_email" /></td>
    </tr>
    <tr>
    <td></td>
    <td style="text-align: center;"><img src="./inc/captcha.php" /></td>
    </tr>
    <tr>
    <td>Captcha:</td>
    <td><input class="Input_Text" type="text" name="reg_captcha" /></td>
    </tr>
    </table>
    <p style="text-align: center"><input type="checkbox" name="reg_rules" value="1" /> <b> I have read the <a href="rules.php">Rules</a> and agree by completing my Registration.</p>
    <table>
    <tr>
    <td style="width: 115px;"></td>
    <td style="text-align: center;"><input class="Input_Button" type="submit" name="reg_submit" value="Register" /></td>
    </tr>
    </table>
    </form>
    <?php include('inc/footer.php'); ?>


  2. #2
    Apprentice 09491594764 is offline
    MemberRank
    Apr 2014 Join Date
    5Posts

    Re: [HELP] Registration and Login problem

    i think nobody can help me...oh well.. :(

  3. #3
    Owner raventh1984 is offline
    MemberRank
    May 2011 Join Date
    NetherlandsLocation
    1,499Posts

    Re: [HELP] Registration and Login problem

    Check if its inserting the values inside ACCOUNT_TBL and ACCOUNT_TBL_DETAILS if not then you need to add correct error log

  4. #4
    Apprentice wns24987 is offline
    MemberRank
    Mar 2009 Join Date
    18Posts

    Re: [HELP] Registration and Login problem

    odbc error (133)

    td(username)



Advertisement