ok i got a very simple login script working but the problem is that it wont find the table when it searches for it using this code:
Code: Select all
$sql = "select * FROM `users` WHERE user_name='$username' AND password=password('$password')";
But, it finds the users in the table with this:
Code: Select all
$sql = "select * FROM `users` WHERE user_name='$username' AND password='$password'";
Also, my register.php works and adds the user to the Database as my get_users.php file shows a list and its there. When i use the 2nd sql it works if i manually enter a user into the database...which basically, if the password is not encypted, the search finds the user, but if it is encrypted (using the register.php) it fails to find it.
Can anybody help me out and find out why it wont find it with the password encrypted?
Sorry im new to php but i have had experience with java so sorry if i seem confused....cos i am.
Thanks, ps2cho