How To Securely Pass Data From Php Forms To Html
I have a login system which is an html form and I need to send the username and password back to the php backend where I can there securely encrypt it and store it in a database. I
Solution 1:
- Google for and read relevant information such as this.
- Do not hash on the client. Pass the clear-text password to the server.
- Use POST to keep the password out of the URL (URLs have a nasty way of getting logged and otherwise exposed to people).
- I personally recommend to use HTTPS everywhere but the minimum is to use HTTPS for the login form and all pages that follow login.
- Store the password in the database using PHP's
password_hash
function and verify it usingpassword_verify
.
Post a Comment for "How To Securely Pass Data From Php Forms To Html"