I want do such as this:
$username0 = $_POST["nkn"];
$username1 = strtoupper($username0);
$query = "SELECT username FROM users WHERE strtoupper(username) = '".$username1."'";
What's the right way to do this? Thanks.
I want do such as this:
$username0 = $_POST["nkn"];
$username1 = strtoupper($username0);
$query = "SELECT username FROM users WHERE strtoupper(username) = '".$username1."'";
What's the right way to do this? Thanks.
Use the below code:
$query = "SELECT username FROM users WHERE UPPER(username) = '".$username1."'";
In mysql the is the function UPPER() to convert the string in upper case.