The first step to making things more secure is to use a one way hashing method....... md5() is a good start. The security you get from this is the fact that the users password is not stored in plain test anywhere on the server. So if the server is compromised, the users passwords still remain relatively safe.
Storing the password information in the database is a good way to get functionality but it does not get you security.
using a username/password combination is the next step in functionality and access personallization, and it also does not gain in security. (aside from the fact that you need a 2 pair token to access the data)
Best advise I can give is to start small, understand all your code, and build on it. Imporving the security and your needs to fit your application/project.
REMEMBER does not matter what security you have in place, but if your username/password is easy to guess, all the security does not matter.
Some other ways to improve security beyond the password.
- use https for all password exchange. Without this the information a user enters is just transfered around the world in plain test for others to read.
- if you dont have https, at least us some find of javascript, hashing on the client side to scramble the password. Public/secret key combination with the server.
- use metrics on your users, isp, browser, etc to restrict access.