How to Preprocess a get lost string data is safe

Source: Internet
Author: User
How to get the string data to be preprocessed before it is safe
Get to a string of characters and then want to put in the SQL where ' project ' =$_get[' xxxxx ' statement, and then find the information in MySQL
How to handle it safely

I want this string to get to only the numbers and the English letters left.

------Solution--------------------
Then you'll have to dispose of characters that are not letters and numbers.
------Solution--------------------
Http://www.w3school.com.cn/php/func_mysql_real_escape_string.asp

Http://www.w3school.com.cn/php/func_string_addslashes.asp

Custom Filtration Functions
------Solution--------------------
Explore

Reference:

Then you'll have to dispose of characters that are not letters and numbers.


Yes, yes, that's it.
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.