Reputation: 1465
I have a text field in my HTML project that I want to encrypt as a password.
So basicaslly instead of this being displayed in the text field:
mypassword
I want it to say:
*********
or something close to that. So basically just making the text that the user inputs not to be visible.
How do I do this?
Upvotes: 2
Views: 6419
Reputation: 1
Just put this in your existing code where you put your textbox
<input type="password" name="password"/>
This will not let you see what you enter and code it with stars, as default.
Upvotes: 0
Reputation: 15023
This has nothing to do with encryption, it's just a form field type, you can use the following:
<input type="password" name="password"/>
However, uploading whatever is entered in here when the user submits will send it plainly across the internet unless you're using HTTPS with a valid SSL certificate, which will encrypt all communications between the user and your site and is recommended for anything with a login.
Upvotes: 1
Reputation: 1
You can use < input type="password" >
like this to hide your password with stars.but it is not enough when you upload your password .you should use PHP or something else
Upvotes: 0
Reputation: 887469
You're looking for <input type="password" />
.
Note that this has nothing to do with encryption.
Upvotes: 1