Registration Page Needed

Results 1 to 9 of 9
  1. #1
    Newbie ThePecko is offline
    MemberRank
    May 2010 Join Date
    9Posts

    Registration Page Needed

    Hello, could anyone please help me out with this damn registration page for flyff, iv tried like 10 scripts so far and none of them worked :S i really don't know how to set registration page up. Please let me know if you can help set this up for me or leave me a tutorial that would help too. Thanks.


  2. #2
    Sorcerer Supreme dudekill is offline
    Member +Rank
    Apr 2009 Join Date
    LocalhostLocation
    290Posts

    Re: Registration Page Needed

    There are good working scripts released out there you should go look at them. All you have to do is configure the settings.

    Here take a loot at this one

    Stored procedure
    Spoiler:

    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE PROCEDURE [dbo].[createaccount]
    @account VARCHAR(15),
    @password VARCHAR(32)

    AS

    SET NOCOUNT ON

    DECLARE @DateActivated AS CHAR(8)

    IF NOT EXISTS (SELECT account FROM ACCOUNT_TBL WHERE account = @account) BEGIN
    INSERT INTO ACCOUNT_TBL (account, [password], id_no2, isuse, member, realname)
    VALUES (@account, @password, @password, 'T', 'A', 'F')

    SET @DateActivated = CONVERT(CHAR(8), GETDATE()-1, 112 ) --Is the date today - 1
    --UPDATE ACCOUNT_TBL_DETAIL SET BlockTime = @DateYesterday WHERE account = @userid
    --INSERT INTO ACCOUNT_TBL_DETAIL (account, gamecode, tester, m_chLoginAuthority, regdate, BlockTime, EndTime, WebTime, isuse)
    -- VALUES (@account, 'A000', '2', 'F', GETDATE(), '20990101', '20990101', '20050101', 'O')

    INSERT INTO ACCOUNT_TBL_DETAIL (account, gamecode, tester, m_chLoginAuthority, regdate, BlockTime, EndTime, WebTime, isuse)
    VALUES (@account, 'A000', '2', 'F', GETDATE(), @DateActivated, '20990101', '20050101', 'O')

    END


    PHP Script
    Spoiler:

    <?php
    $link = @mssql_connect("\SQLEXPRESS", "user", "pass") or die ("Server is down!");
    $db = @mssql_select_db('ACCOUNT_DBF') or die ("Accout table is missing!");
    $b = '';
    $mail = '';
    function doesUsernameExist($name){
    $exit = FALSE;
    $result = @mssql_query("SELECT * FROM ACCOUNT_TBL WHERE account='$name'");
    if (mssql_num_rows($result) != 0){
    $exit = TRUE;
    }
    return $exit;
    }

    if(isset($_POST['submit'])){
    $user = preg_replace ("[^A-Za-z0-9]", "", $_POST['username']);
    $pass = preg_replace ("[^A-Za-z0-9]", "", $_POST['password']);
    if($_POST['username'] == ""){
    echo '<font color="red">Enter a user.</font><br /><br />';
    }
    else if($_POST['password'] == ""){
    echo '<font color="red">Enter a password.</font><br /><br />';
    }
    else if ((strlen($_POST['username']) > 16) || (strlen($_POST['username']) < 3)){
    echo '<font color="red">The user should be 3 to 16 characters.</font><br /><br />';
    }
    else if ((strlen($_POST['password']) > 16) || (strlen($_POST['password']) < 3)){
    echo '<font color="red">The password should be 3 to 16 characters.</font><br /><br />';
    }
    else if($_POST['username'] != $user){
    echo '<font color="red">User with invalid characters.</font><br /><br />';
    }
    else if($_POST['password'] != $pass){
    echo '<font color="red">Password with invalid characters.</font><br /><br />';
    }
    else {
    $pass = md5('serus' . $pass);
    if(!doesUsernameExist($user)){
    $stmt = mssql_init('createaccount', $link);
    mssql_bind($stmt, '@account', $user, SQLVARCHAR, false, false, 15);
    mssql_bind($stmt, '@password', $pass, SQLVARCHAR, false, false, 36);

    mssql_execute($stmt) or die ("Something is wrong on the execution");
    mssql_free_statement($stmt);
    echo '<font color="Green">Register Successfull.</font><br /><br />';
    }
    else {
    echo '<font color="red">User already Exist.</font><br /><br />';
    }
    }
    mssql_close();
    }

    echo '<form action="#" method="post">';
    echo 'Username: <input type="text" name="username" /><br /><br />';
    echo 'Password: <input type="password" name="password" /><br /><br />';

    echo '<br /><input type="submit" name="submit" value="Register" />';
    echo '</form>';

    ?>


    \SQLEXPRESS = Your SQL Host
    user = Your SQL Server user (Default: sa)
    pass = Your SQL Server password

    If problem still exists then leave a reply i will assist you with it.

    I Do not take the credit as i am not sure who released it, i don't have time to make one right now.
    Last edited by dudekill; 15-08-11 at 01:37 AM.

  3. #3
    Newbie ThePecko is offline
    MemberRank
    May 2010 Join Date
    9Posts

    Re: Registration Page Needed

    Hm i got a problem i tried to execute procedure you gave me above and it says completed but with error as you can see from this picture
    and also i added required info in php script and when i try to run it i get blank white screen. Any ideas?

  4. #4
    [R8]ℓσℓ32 caja is offline
    Grand MasterRank
    Oct 2008 Join Date
    Here!Location
    1,502Posts

    Re: Registration Page Needed

    That means you already got that sp in the database. Just use the PHP script.

  5. #5
    Newbie ThePecko is offline
    MemberRank
    May 2010 Join Date
    9Posts

    Re: Registration Page Needed

    i tried i added required info that dudekill said in script and saved as php but when i try to open it i get just a white blank page :(

  6. #6
    Sorcerer Supreme dudekill is offline
    Member +Rank
    Apr 2009 Join Date
    LocalhostLocation
    290Posts

    Re: Registration Page Needed

    What web service are you using?

  7. #7
    Newbie ThePecko is offline
    MemberRank
    May 2010 Join Date
    9Posts

    Re: Registration Page Needed

    im using wamp

  8. #8
    Sorcerer Supreme dudekill is offline
    Member +Rank
    Apr 2009 Join Date
    LocalhostLocation
    290Posts

    Re: Registration Page Needed

    did you enable mssql and php or something i don't use wamp so i am not sure :/

  9. #9
    Newbie ThePecko is offline
    MemberRank
    May 2010 Join Date
    9Posts

    Re: Registration Page Needed

    yea i enabled both of those things, btw what do you use i could try it maybe it would work then, if you have time i could give you access either over rdp or teamviewer so you could check out the whats the problem.



Advertisement