Hi Guys,
I'm interested in getting started with php, so I thought I'd make a simple text browser based game (Including a mysql database) and just take it step by step from there.

The first thing I want to become knowledgeable about is security and how to record usernames passwords in the best possible way.

What should I take into consideration when designing the registration/login process, as well as any other form where the user can input data.

What should I prevent the user from typing in?

And how should I go about encrypting the login information, storing it, and then comparing what they type in next time they log in, to what's stored in the database?

I don't need a step by step walk through, just a list of things that I need to go look up, including specific things to includ in my validation/encryption if possible please.