Hello everyone,
I'm out to do the same thing as so many others before me, make an authentication script with PHP and MySQL. However, before I dive in, I want to make sure how deep the pool is. So, let's start with the syntax I should use.
Reading in the PHP manual, it seems "mysqli" can be used to connect to MySQL databases and is actually better to use. Please, correct me if I'm wrong. If I am, I guess I'll be reverting to the "mysql" syntax?
Anyways, in making an authentication script, how would I ensure that it remains secure? I've done some reading on the Internet and the most popular methods are to, "sanitize" any user input, to store passwords through MD5 encryption, to store user IPs in the database, to store cookies in the database, and to store sessions in the database (Feel free to correct me on some of this. I'm new at it and probably misused some terms).
Is there anything else that I should be aware of that could help add to the security of an authentication script?
And lastly, are there any other tips on the construction of an authentication script for a first-timer, such as me?
Thank you all in advance, for any advice.