MySQL escape function which master gave the younger brother a

Source: Internet
Author: User
Tags php mysql
MySQL escape function who gave the little brother a
PHP MySQL escape function who gives the younger brother one, queries the time seems to have to invert the righteousness function, enlighten!

The symbols of <> should be able to turn. MySQL Escape

Share to:


------Solution--------------------
Reference:
I do not know Ah, is the form submitted, anyway, input MySQL in the use of the turn, as if not to turn the words ABC this is not miserable?

This is going to turn, or it will go wrong.
Warehousing to turn, out of the library display is not required.
Examples
Example 1. Mysql_escape_string () example

$item = "Zak ' s Laptop";
$escaped _item = mysql_escape_string ($item);
printf ("Escaped string:%s\n", $escaped _item);
?>

The above example would output:

Escaped string:zak\ ' s Laptop



Notes
Note:mysql_escape_string () does not escape% and _.

See Also


Mysql_real_escape_string ()
Addslashes ()
The MAGIC_QUOTES_GPC directive.
------Solution--------------------
Reference:
44 is the new input, how empty?

You see mysql_escape_string This function is followed by a string, but you give him the number of groups. You receive the form one after another to go back to the storage!
  • 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.