Secure Login in HTML/PHP
in my website i have a login form, and i do this:
<form class="user-form" action="login.php" method="post">
to send information to server, and in the server i do this:
`
$username = $POST['user'];
$password = $POST['psw'];
````
to get the information, and then i store the information securely on my database with salt etc…
My question is how i can protect the information that will be send from the page to the server with the $_POST? there is something to encrypt and not send it clearly?
Thanks
```
5 Replies
What httpd software are you using (Apache, nginx, lighttpd, etc)?
Also worth noting if you're storing passwords in a DB, don't deal with 'salting' and stuff on your own, assuming you're using even a slightly old PHP, you should have support for password_hash(), use that for your passwords.