我从我的服务器得到json响应。我想通过mysql-PHP将所有这些值保存在数据库中。请帮助。
{"fields":[{"label":"Do you have a website?","field_type":"website","required":false,"field_options":{},"cid":"c1"},{"label":"Security personnel #82?","field_type":"radio","required":true,"field_options":{"options":[{"label":"Yes","checked":false},{"label":"No","checked":false}],"include_other_option":true},"cid":"c10"},{"label":"Medical history","field_type":"file","required":true,"field_options":{},"cid":"c14"}]}
答案 0 :(得分:1)
如果你已经没有,你首先必须编码那个json对象,
然后使用mysqli_real_escape_string()-php
转义引号然后将其插入数据库。
有关详细信息,请参阅google.com