How to prepare Cyrillic and other variables for storing into MySql DB? (PHP)
So I need realy simple way to prepare recived from browser $_GET[string] variables for storing into DB.
How to do such thing?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You shouldn’t need to make any modifications to the strings at all. But you will want to ensure your database and table encoding are set to utf8. Normally they default to latin1.
Also, when pulling data from the database later on, you will want to set the connection encoding to utf8 before making any other queries. You do this by executing the query: