belick Posted November 21, 2005 Share Posted November 21, 2005 I need to use my PHP function in the mysql query like: SELECT Password FROM TABLE WHERE User = 'AnyUser' && '$_POST[PASS]' = checkcrypt(Password ) LIMIT 0,1 Any help? Quote Link to comment Share on other sites More sharing options...
ryanlwh Posted November 21, 2005 Share Posted November 21, 2005 $sql = "SELECT Password FROM TABLE WHERE User = 'AnyUser' && '$_POST[PASS]' = '".checkcrypt(Password)."' LIMIT 0,1"; Quote Link to comment Share on other sites More sharing options...
belick Posted November 21, 2005 Author Share Posted November 21, 2005 I tried that, the problem is that I need to place the "Password" field from the database which is something like: SDFDS3532523rfqASdfsd3D23D3f223g3g and instatd its try to decrypt the word Password... Quote Link to comment Share on other sites More sharing options...
ryanlwh Posted November 21, 2005 Share Posted November 21, 2005 i thought Password was coming from a php variable... how did you store the password? MD5? Quote Link to comment Share on other sites More sharing options...
belick Posted November 21, 2005 Author Share Posted November 21, 2005 kind of I have my own encryption function, if it was md5 so mysql would work fine, that's my problem... :-( Quote Link to comment Share on other sites More sharing options...
ryanlwh Posted November 21, 2005 Share Posted November 21, 2005 if you encrypt the password before storing into the db, then you could use the syntax I gave you. If not, then you have to do that after you got the record from the query. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.