login.php problem !!

Page 2 of 2 FirstFirst 12
Results 16 to 27 of 27
  1. #16
    Gruntilda Gruntilda is offline
    MemberRank
    Apr 2010 Join Date
    468Posts

    Re: login.php problem !!

    ...

    Just change line 16 to:

    Code:
    if($exec)

  2. #17
    Member bruna157 is offline
    MemberRank
    Dec 2011 Join Date
    87Posts

    Re: login.php problem !!

    lol erro again see
    Parse error: syntax error, unexpected '.' in C:\wamp\www\Login.php on line 43

    Quote Originally Posted by bruna157 View Post
    lol erro again see
    Parse error: syntax error, unexpected '.' in C:\wamp\www\Login.php on line 43
    or add this

    if($exec) = mssql_query("SELECT sUserPW FROM tUser where sUserID = '$user'");

  3. #18
    Gruntilda Gruntilda is offline
    MemberRank
    Apr 2010 Join Date
    468Posts

    Re: login.php problem !!

    I have no idea why you're trying to use this for anything, but here:

    Code:
    <?php
    
    $conf['db_host'] = ".\SQLEXPRESS";
    $conf['db_user'] = "";
    $conf['db_pass'] = "";
    $conf['db_name'] = "Account";
    
    $user = sql_clean($_GET['Username']);
    $passhash = sql_clean($_GET['Password']);
    
    $con = mssql_connect($conf['db_host'],$conf['db_user'],$conf['db_pass']) or die('Database connect Fail.');
    $db = mssql_select_db($conf['db_name'], $con) or die('Database Init Fail.');
    
    $exec = mssql_query("SELECT sUserPW FROM tUser where sUserID = '$user'");
    
    if($exec)
    {
        if(mssql_num_rows($exec) != 1)
    	{
    		die('Account Not Found.');
    	}
    	$AccountData = mssql_fetch_assoc($exec);
    	$PlaintxtPass = $AccountData['sUserPW'];
    	if (MD5($PlaintxtPass) == $passhash)
    	{
    		die('OK');
    	} 
    	else
    	{
    		die('Wrong Password.');
    	}
    } 
    else
    {
    	die('Query Failed');
    }
    
    mssql_close();
    
    function sql_clean($str)
    {
    	$search=array("\\","\0","\n","\r","\x1a","'",'"');
    	$replace=array("","","","","","","");
    	return str_replace($search,$replace,$str);
    }
    ?>

  4. #19
    Member bruna157 is offline
    MemberRank
    Dec 2011 Join Date
    87Posts

    Re: login.php problem !!

    i will try to use this code

    err again aff
    Notice: Undefined index: Username in C:\wamp\www\Login.php on line 8

    Notice: Undefined index: Password in C:\wamp\www\Login.php on line 9

    Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: WIN-2VZMU0ST2PK\SQLEXPRESS in C:\wamp\www\Login.php on line 11
    Database connect Fail.

    err again aff
    Notice: Undefined index: Username in C:\wamp\www\Login.php on line 8

    Notice: Undefined index: Password in C:\wamp\www\Login.php on line 9

    Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: **************\SQLEXPRESS in C:\wamp\www\Login.php on line 11
    Database connect Fail.

  5. #20
    Gruntilda Gruntilda is offline
    MemberRank
    Apr 2010 Join Date
    468Posts

    Re: login.php problem !!

    Just give up.

  6. #21
    Member bruna157 is offline
    MemberRank
    Dec 2011 Join Date
    87Posts

    Re: login.php problem !!

    ok ok always erro

  7. #22
    Account Upgraded | Title Enabled! Charisma Doll is offline
    MemberRank
    Oct 2012 Join Date
    Wonderland.Location
    256Posts

    Re: login.php problem !!

    delete post pls. :3

  8. #23
    Account Upgraded | Title Enabled! Crystalz is offline
    MemberRank
    Aug 2012 Join Date
    212Posts

    Re: login.php problem !!

    Quote Originally Posted by Versaaa View Post
    delete post pls. :3
    Aww, I was hoping for you to say something fun. :c

  9. #24
    Account Upgraded | Title Enabled! aqua512 is offline
    MemberRank
    Nov 2012 Join Date
    574Posts

    Re: login.php problem !!

    I have an idea Bruna157, suck it up and purchase a launcher from iStu. It's so much easier than what your doing. 0.o

  10. #25
    Electro, dude. Bakey is offline
    MemberRank
    Oct 2010 Join Date
    403Posts

    Re: login.php problem !!

    Yes pls. Money money money.

  11. #26
    Account Upgraded | Title Enabled! Charisma Doll is offline
    MemberRank
    Oct 2012 Join Date
    Wonderland.Location
    256Posts

    Re: login.php problem !!

    Quote Originally Posted by Crystalz View Post
    Aww, I was hoping for you to say something fun. :c
    But I'm no fun. :c

  12. #27
    Valued Member dontknown is offline
    MemberRank
    Mar 2012 Join Date
    128Posts

    Re: login.php problem !!

    I dontknown why is so dificult for some people to read the errors



Page 2 of 2 FirstFirst 12

Advertisement