我有一些注册,它将标记作为值发送到服务器
<input type="hidden" id="tag-sm" name="tag-sm" value="workshops_10.2017">
现在我必须发送两个不同的标签
<input type="hidden" id="tag-sm" name="tag-sm" value1="workshops_10.2017" value2="events">
这是我的php:
$obj = array(
'first-name' => htmlspecialchars($_POST['first-name']),
'last-name' => htmlspecialchars($_POST['last-name']),
'email' => htmlspecialchars($_POST['email']),
'phone' => (isset($_POST['phone'])) ?
'tag' => htmlspecialchars($_POST['tag-sm']),
'discount-codes' => (isset($_POST['discount-codes'])) ?
);
如何用php获取这两个值?
答案 0 :(得分:0)
为两个
创建单独的input
<input type="hidden" id="tag-sm-1" name="tag-sm-1" value="workshops_10.2017">
<input type="hidden" id="tag-sm-2" name="tag-sm-2" value="events">