Well, the question is kinda vague, but here goes..let's assume some things:
- you have a table called users
- table users has 3 fields, id/username/password.
- you have the username and password in variables already
- you have stored the password in the database using mysql's crypt function.
Assuming all that, you should be able to run a query that looks like this:
SELECT id FROM users WHERE username='$username' AND password=crypt($password)
If you get a row back from that, you've got a match and a validated user...
This is obviously a simple design and there is more to it than this. If you look around I am sure you could find some code snippets that give further details. In fact, there are some on my site in the code section.
Matt Wade
codewalkers.com