【发布时间】:2015-08-30 02:48:30
【问题描述】:
我有一个表格,其中包括
<input id="user-id" type="text" data-user-id="" name="message" placeholder="type and send..." class="form-control">
data-user-id HTML5 数据属性。当我提交表单时,我想在 php 类中使用 data 属性的值。如何在php中访问这个数据属性?
【问题讨论】:
-
您的意思是在 $post 中或通过 xmlparser。?
-
我想将此值存储在 db 中,因此我必须以某种方式通过 php 访问它。
标签: php html custom-data-attribute