SQL - check user md5 password

Initiate Mage
Joined
Dec 31, 2004
Messages
2
Reaction score
0
u can use this stored procedure to check user md5 password when he log into u webpage:

btInStrIndex = loginName
btInStr = loginPass

it returns 1 if password and loginname are correct

CREATE PROCEDURE CheckPass
@btInStr VARCHAR(10),
@btInStrIndex VARCHAR(10)
AS

BEGIN
DECLARE @iOutResult TINYINT
DECLARE @btInVal BINARY(16)

SELECT @btInVal = memb__pwd FROM MEMB_INFO WHERE memb___id = @btInStrIndex;

EXEC master..XP_MD5_CheckValue @btInStr, @btInVal, @btInStrIndex, @iOutResult OUT
RETURN @iOutResult;
END;
 
Can u give example of it with php script?
 
Alternative ^^

CREATE PROCEDURE Compara
@btInStr VARCHAR(10),
@btInStrIndex VARCHAR(10)
AS
BEGIN
DECLARE @btOutVal BINARY(16)
EXEC master..XP_MD5_EncodeKeyVal @btInStr, @btInStrIndex, @btOutVal OUT
Select memb___id from MEMB_INFO where memb___id=@btInStrIndex and memb__pwd = @btOutVal
END
GO
 
Bah, I simply use
Code:
$validate = query("SELECT *
	                   FROM   dbo.MEMB_INFO
	                   WHERE  memb___id = '$username'
	                    AND   memb__pwd = [dbo].[fn_md5]('$password','$username')");

And ofcourse the procedure for that is installed automatically with the new FrogWeb3.0 :icon6:
 
u can use this stored procedure to check user md5 password when he log into u webpage:

btInStrIndex = loginName
btInStr = loginPass

it returns 1 if password and loginname are correct

please tell us how/what to use on php.
 
Back