Why is the database empty after I insert html tags into the database?

Source: Internet
Author: User
Here is a regular expression. if the submitted data matches this regular expression, use pdo to insert it to the database. this is the regular expression $ reg & #039; ^. {60,600} $ & #039; but for example, if I insert a few casually written html tags and submit them, it will show that the inserted database has a piece of data but this piece of data... here is a regular expression. if the submitted data matches this regular expression, it will be inserted to the database using pdo.
This is the regular expression $ reg = '/^. {60,600} $/'. However, for example, I inserted several html tags that I wrote casually.
After submission, it is displayed that a piece of data is added to the inserted database, but the data is empty. why?

If I insert some characters or something, for example, all of the following will show why html tags cannot be inserted. I didn't filter html tags, so there is only one regular expression. is it automatically filtered by pdo?

/;'\,.":! @ # $ % ^ &*

Reply content:

Here is a regular expression. if the submitted data matches this regular expression, it will be inserted to the database using pdo.
This is the regular expression $ reg = '/^. {60,600} $/'. However, for example, I inserted several html tags that I wrote casually.
After submission, it is displayed that a piece of data is added to the inserted database, but the data is empty. why?

If I insert some characters or something, for example, all of the following will show why html tags cannot be inserted. I didn't filter html tags, so there is only one regular expression. is it automatically filtered by pdo?

/;'\,.":! @ # $ % ^ &*

The first regular expression contains 60 to 600 characters. your HTML section contains only 37 characters, which cannot be matched.

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.