Happey new year folks. I have an autocomplete input and the rub is in my DB there are rows in many languages not only in english but in russian, chinese etc.
What is the best way I can sanitize the input to prevent sql injections?
P.S. I will only allow text no numbers! Just need to make sure no special characters are passed to sql!
What prevents you from using prepared statements in other alphabets? I haven’t read up on it in great detail, but it would seem to be quite short-sighted to implement such an important feature that does not support other widely-used alphabets.
Absolutely nothing stops him from using them. Prepared statements dont do anything against strings, so they can take any alphabet.
OP, you asked about preventing injections. Prepared statements are how to do that. If you want to further restrict the input to a sanitized list, you’re going to have to do a lot more work (and for very limited/no gain.)