I'm using uppercase in the database but when I test the input type it doesn't work when I use lowercase.
I tried to change this with CSS:
text-transform: uppercase;
it still doesn't work, it works only when I use the caps lock.
I tried also the strtoupper (PHP) function.
My question is: How can I send the input as uppercase without using the caps lock?
I think it will work if I make a copy of the database with small letters but is there a simple option to fix this?
my php code:
<?php
require_once 'db_config.php';
if($_SERVER['REQUEST_METHOD'] == "POST") {
    $postcode = array();
    $result = mysql_query("SELECT postcode FROM postcode_check");
    while($row = mysql_fetch_assoc($result)){
        $postcode[] = $row['postcode'];
    }
    if(preg_match('/^[1-9][0-9]{3} ?[a-zA-Z]{2}$/', $_POST['postcode'])) {
        if(in_array($_POST['postcode'],$postcode)) {
            $winkel = "<a href='#' class='g-btn type_postcode' role='button'>winkel</a>";
            echo "FreshFoods is beschikbaar bij jou in de buurt. $winkel";
        } else {
            echo  'FreshFoods is nog niet beschikbaar bij u in de buurt.';
        }
    } else {
        echo 'Voer 4 cijfers en 2 letters in als postcode. Voorbeeld 1234AB';
    }
}
?>
html code
<form method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
<input type="text" placeholder="1234AB" maxlength="6" autocomplete="off" name="postcode" class="small" />
<input type="submit" value="controleer" />
</form>
 
     
    