如何将表单数据从多重字段插入到一个SQL表列中 [英] How to insert form data from multible fields into one sql table column

查看:95
本文介绍了如何将表单数据从多重字段插入到一个SQL表列中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请考虑以下html字段.

Consider the following html fields.

<form style="width:100px" action="phpformposttest.php" method="post">
<input type="text" name="Area">
<input type="text" name="Area2">
<input type="text" name="Zip">
<input type="submit">
</form>

使用php,如何将("Area","Area2"和"Zip")插入从这些多个输入收集的一列中.

Using php, how do i insert ("Area", "Area2", and "Zip") into one column collected from these multiple inputs.

推荐答案

为什么不存储为单独的列.将数据分开然后进行解析总是比较容易的.同时将它们组合在一起将使查询变得更加困难.

Why not store as separate columns.. It's always easier to leave data apart then to have to parse it. Also having them all together will make it harder to query.

这篇关于如何将表单数据从多重字段插入到一个SQL表列中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆