如何在不使用特殊字符和正则表达式的情况下发布数据


how to post data without special characters and without using regex

我张贴表单数据到php文件,然后将其存储在数据库中。我使用序列化方法来序列化表单数据。它将数据序列化为:

date=1%2BF%2+-+1%2BF%2&selValue0%2B%C=23

但是我想把它贴出来:

date =12-12&selValue0=23

我试过unserialize()在php, url编码解码在javascript和php,但不工作

<form method="POST">
<input type="text" name="date" />
<input type="text" name="setValue0" />
<input type="submit" />
</form>
<?php
echo @file_get_contents('php://input');
?>
相关文章: