I wish to make so when you search e.g “A” then every full_name with beginning “A” will appear.
So if a user with name “Andreas blabla” will show
I have this right now:
$query = "SELECT full_name, id, user_name, sex, last_access, bostadsort
FROM users WHERE full_name LIKE '$_GET[searchUser]'";
But still i need to search “Andreas blabla” in order to get him out the query(show). So this doesnt work.
How can i do this?
Use the
%meta character after the input character in theLIKEcomparison:And don’t forget to validate the input or escape the output properly when inserting it into the query.