I want to prevent people from pasting password in login form. Is it possible by PHP to disable the ability to paste into input fields.
You can simply do this with HTML by adding some properties to input.
I don't know why you want to use
PHPfor this.
<input type="test" onCopy="return false" onDrag="return false" onDrop="return false" onPaste="return false"/>
Use below code HTML
<input type="password" id="pwd">
Jquery
$('#pwd').bind("cut copy paste",function(e) {
e.preventDefault();
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With