Usually you store the password hash in the database, see md5 , however this does not make it secure between the web page and the server - for this you need to use https.
There are two things here.
1. If I am a dumb user, and when I register my site, I must provide a password that could provide the same password as in other places, so your site should really store a password hash instead of the real one, so if they get hacked attackers will not get my password, which I used everywhere. To do this, you store the hash in the table of your participants, and in the request that checks that it is valid, you pass the hash instead of the real thing.
2. In accordance with http, the password will be sent from the browser to the server in plain text. If it is via the Internet, and the attacker has access to any networks between the browser and the client, then they can see the password - if you use it in the browser using javascript, the attacker can pick up the hash and possibly use it to log into your site. That is why we have https. For a low cost (especially compared to development costs), you can purchase a certificate that will provide a connection. If you do not want to do this, you can sign the certificate yourself and use it. If your hosting does not allow you to use a certificate, you can probably create a home brew solution, but it is much better to just find another hosting.
Adam butler
source share