Php extracts the special symbols passed by post.

Source: Internet
Author: User
Tags echo date
Php retrieves the special symbols passed by post. the front-end page has a check box (multiple choice) with the following code: & lt; select & nbsp; namelevel & nbsp; data-options & nbsp; multiple: true & nbsp; & gt php retrieves special symbols passed by post
The code of the check box (multiple choice) on the front-end page is as follows:
        All Level        A        B        C        D    


Retrieve the background page with post
$level =isset($_POST['level'])? implode("",$_POST['level']):"'A+','A-','A','B','C','D'";

I want to use the SQL in statement to query data in the database, but the problem is that the passed value SQL always reports an error. I printed it and found that the value received in the background seems to be an array,

I would like to ask how to get the correct multiple selection values from the front?
------ Solution --------------------
Print_r ($ _ POST ['level']);
View Results
------ Solution --------------------

------ Solution --------------------
Echo date ('Y-m-d H: I: S', strtotime ("$ datea-1 year "));

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.