Jan Jan - 3 months ago 19
HTML Question

changing input to uppercase and posting it to mysql database

User needs to type an input and this is the code:

Ime projekta: <input type="text" class="normal" name="ime_projekta" size="20" maxlength="20" style="text-transform:uppercase" /><br><br>
<input type="submit" class="like" value="OK" />


This works! When i type all characters all upper case (caps lock off). But! This is later posted to database and when i check my database all my inputs are lowercase.

Any ideas?

Answer

The text-transform only changes the apperance on the client side. When the text is recieved by the backend, it's still lowercase. You will have to apply an uppercase function (strtoupper) to your text using php.