Don't store their password in the session.
When they sign up encrypt their password before you put it in the database.
I used to use http://us.php.net/manual/en/function.md5.php I believe but it has been a while.
Then when they sign in encrypt the password they typed in and then compare it to the encrypted password in the database. Don't store their actual password in case the database is compromised.
You should also read up on public keys and private keys: http://en.wikipedia.org/wiki/Public-key_cryptography.
and also SQL injection:
http://en.wikipedia.org/wiki/Sql_injection
When they sign up encrypt their password before you put it in the database.
I used to use http://us.php.net/manual/en/function.md5.php I believe but it has been a while.
Then when they sign in encrypt the password they typed in and then compare it to the encrypted password in the database. Don't store their actual password in case the database is compromised.
You should also read up on public keys and private keys: http://en.wikipedia.org/wiki/Public-key_cryptography.
and also SQL injection:
http://en.wikipedia.org/wiki/Sql_injection