On Thursday 06 March 2003 13:21, Chinmoy Barua wrote:

> I have an user table where the username and passwords of the users are
> stored. The passwords are stored in encrypted format (the MySQL function
> 'ENCRYPT($password) is used for insertation).
>
> Now I want to varify username and password. For that, I have written the
> followin PHP code:
>
> ---------------------------------------------------------------------------
>------------------ N.B.: " $flogin " is a veriable which store username from
> a HTML form. & "$fpass " is a veriable which store password from a HTML
> form.
>
>
>
> $query="SELECT UserName, Attribute, Value FROM radcheck WHERE
> UserName='$flogin 

Try:

  SELECT UserName, Attribute, Value 
    FROM radcheck 
   WHERE UserName='$flogin'
     AND PasswordField = ENCRYPT('$fpass')

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
The part of the world that people find most puzzling is the part called "Me".
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to