php取出post传递的特殊符号有关问题

WBOY
Release: 2016-06-13 11:50:22
Original
1078 people have browsed it

php取出post传递的特殊符号问题
前台页面有复选框(多选)框代码如下:

<select id="level" class="easyui-combobox" name="level" data-options=" multiple:true" style="width:150px;"><br />        <option value="'A+','A-','A','B','C','D'">All Level</option><br />        <option value="'A+','A-','A'">A</option><br />        <option value="'B'">B</option><br />        <option value="'C'">C</option><br />        <option value="'D'">D</option><br />    </select>
Copy after login


后台页面用post取出
	$level =isset($_POST['level'])? implode("",$_POST['level']):"'A+','A-','A','B','C','D'";
Copy after login

想用sql的in语句去数据库查询数据,但问题来了,这样传递的值sql老是报错,打印出来发现后台接收的值好像是个array,

请教下该怎么从正确的取到前面传来的多选值?
------解决方案--------------------
print_r($_POST['level']);
看看结果
------解决方案--------------------

------解决方案--------------------
echo date('Y-m-d H:i:s',strtotime("$datea -1 year"));

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!