-
hi. i am doing our school alumni online registry. I want to know how you get to break search results into 20 and if the total search results found is more than 20, it'll display [Next>>]? I am also wondering how to check the password entered by the user? (in mysql database the password was entered with password($password)). thanks
-
Splitting up of query results was covered in Part 9: "Advanced SQL" of my series, "Building a Database-Driven Web Site using PHP and MySQL" on WebmasterBase.com. The relevant section is entitled "Setting LIMITs".
As for checking passwords, you can retrieve the encrypted password using a normal SQL SELECT query. Next, get MySQL to encrypt the password the user entered with the following query:
SELECT PASSWORD("thePassword")
Finally, compare the two encrypted values. If they are equal, then the password entered is correct!
------------------
-Kevin Yank.
http://www.SitePoint.com/
Helping Small Business Grow Online!