我想在一個表格字段中存儲html表單中的幾個字段。這是表單的源代碼。這只是表單的一部分,表單標籤在那裏。附件是表格這一部分的截圖。如何在一個mysql表字段中存儲多個HTML表單字段?
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td><input class="field checkbox" type="checkbox" value="Automotive" /><label class="choice">Automotive</label></td>
<td> Remark:<input name="rem_app_1" type="text" size="50" value=""/></td>
</tr>
<tr>
<td><input class="field checkbox" type="checkbox" value="Backlights"/><label class="choice">Backlights</label></td>
<td> Remark:<input name="rem_app_2" type="text" size="50" value=""/></td>
</tr>
<tr>
<td><input class="field checkbox" type="checkbox" value="Signage/Traffic lights"/><label class="choice">Signage/Traffic lights</label></td>
<td> Remark:<input name="rem_app_3" type="text" size="50" value=""/></td>
</tr>
<tr>
<td><input class="field checkbox" type="checkbox" value="IR" /><label class="choice">IR</label></td>
<td> Remark:<input name="rem_app_4" type="text" size="50" value=""/></td>
</tr>
<tr>
<td><input class="field checkbox" type="checkbox" value="LED lights"/><label class="choice">LED lights</label></td>
<td> Remark:<input name="rem_app_5" type="text" size="50" value=""/></td>
</tr>
<tr>
<td><input class="field checkbox" type="checkbox" value="Mobile devices"/><label class="choice">Mobile devices</label></td>
<td> Remark:<input name="rem_app_6" type="text" size="50" value=""/></td>
</tr>
</table>
它存儲在MySQL的應該是這樣的,這取決於用戶點擊什麼複選框,例如:
Automotive, Remark: blablabla
Backlights, Remark: blubblubblub
Mobile applications, Remark: skdfjasldfkj
是的,PHP 5.2.14 – 2010-08-26 07:51:23