Before adding to your database, convert the string to lowercase. I put the short example of how to convert in PHP and Java Script to lowercase (minute letters).
In PHP:
$string = "TESTE";
echo strtolower($string); //teste
Javascript:
var string = "TESTE";
console.log(string.toLowerCase()); // teste
To force the field to always be minuscule letters, it would look like this:
// Função javascript
function lowerCase(input) {
input.value = input.value.toLowerCase();
}
Tente digitar letras maiúsculas:
<input type="text" id="txt" onkeyup="return lowerCase(this)" />
I improved the above example. You need to put this javascript function in a . js file and in its input, put onkeyup="return lowerCase(this)"
.
Thank you for the javascript response as I insert this into an input text for example
– Felipe Henrique
I saw your next friend response this way that you did not display on time to the user ? i wanted a way that already displayed itself to it all minuscule in the form not convert at the time of saving it would have to see the letters be written in lowercase even with the Capslock turned on
– Felipe Henrique
I edited my answer, Kirito, see if it works.
– Lucas de Carvalho