Secure login php
<p>I am doing, a webpage that the users will introduce their credit cards and also they could get virtual money.</p>

<p>But i was thinking if the next type of login will be secure. For everything SQL INJECTION. And hack.</p>

<ul>
<li>It will be encrypted with SSL</li>
<li>Paswoord md5.</li>
<li>Mail will be validate with js</li>
</ul>

<p>Login Proces Which its better?:
First one:
- SELECT * FROM users WHERE pass='$pass'
- and the users selected i compare it with the users or mail from the username.</p>

<p>Second one:
- SELECT * FROM users WHERE user='$user'
- Pass selected compare it with the pass from user</p>

<p>Thrird one:
- Hash md5 both user and password and compare it directly in the DB. But I need to save the username encrypted and normal</p>

<p>Thanks :)</p>
