html 多<选择>PHP 帖子中的数组选择>
<form>
<input class="date-pick" type="text" value="2010/08/02" name="date" />
<table id="events_selection">
<tr>
<td>
<img src="/admin/ajax/image.php?filename=/media/immagini/danieledaniela/1.jpg&maxw=200" />
<select name="1">
<option value="0"> NESSUN EVENTO </option>
<option value="5">anelli</option>
<option value="8">ballo</option>
<option value="6">cerimonia in chiesa</option>
<option value="13">dettagli</option>
<option value="9" selected="selected"><strong>festa</strong></option>
<option value="4">gli sposi</option>
<option value="1">la sposa</option>
<option value="3">lancio del riso</option>
<option value="2">lo sposo</option>
<option value="11">preparazione sposa</option>
<option value="10">preparazione sposo</option>
<option value="7">ristorante</option>
<option value="12">varie</option>
</select>
</td>
<td>
<img src="/admin/ajax/image.php?filename=/media/immagini/danieledaniela/30.jpg&maxw=200" />
<select name="31">
<option value="0"> NESSUN EVENTO </option>
<option value="5">anelli</option>
<option value="8">ballo</option>
<option value="6">cerimonia in chiesa</option>
<option value="13">dettagli</option>
<option value="9">festa</option>
<option value="4">gli sposi</option>
<option value="1">la sposa</option>
<option value="3">lancio del riso</option>
<option value="2">lo sposo</option>
<option value="11">preparazione sposa</option>
<option value="10">preparazione sposo</option>
<option value="7">ristorante</option>
<option value="12">varie</option>
</select>
</td>
</tr>
</table>
</form>
您好,在这样的情况下(这是一个示例,有很多选择和其他输入)发布此表单将给出这样的 $_POST
array {
date => "2010/08/09"
input1 => "bla"
input3 => "bla2"
//list of selection
1 => 2
2 => 4
3 => 5
//ends list of selection
input 4 => "bla4"
}
我可以直接从 HTML 表单中输入
array {
date => "2010/08/09"
input1 => "bla"
input3 => "bla2"
//list of selection
array {
1 => 2
2 => 4
3 => 5
}
//ends list of selection
input 4 => "bla4"
}
谢谢!
<form>
<input class="date-pick" type="text" value="2010/08/02" name="date" />
<table id="events_selection">
<tr>
<td>
<img src="/admin/ajax/image.php?filename=/media/immagini/danieledaniela/1.jpg&maxw=200" />
<select name="1">
<option value="0"> NESSUN EVENTO </option>
<option value="5">anelli</option>
<option value="8">ballo</option>
<option value="6">cerimonia in chiesa</option>
<option value="13">dettagli</option>
<option value="9" selected="selected"><strong>festa</strong></option>
<option value="4">gli sposi</option>
<option value="1">la sposa</option>
<option value="3">lancio del riso</option>
<option value="2">lo sposo</option>
<option value="11">preparazione sposa</option>
<option value="10">preparazione sposo</option>
<option value="7">ristorante</option>
<option value="12">varie</option>
</select>
</td>
<td>
<img src="/admin/ajax/image.php?filename=/media/immagini/danieledaniela/30.jpg&maxw=200" />
<select name="31">
<option value="0"> NESSUN EVENTO </option>
<option value="5">anelli</option>
<option value="8">ballo</option>
<option value="6">cerimonia in chiesa</option>
<option value="13">dettagli</option>
<option value="9">festa</option>
<option value="4">gli sposi</option>
<option value="1">la sposa</option>
<option value="3">lancio del riso</option>
<option value="2">lo sposo</option>
<option value="11">preparazione sposa</option>
<option value="10">preparazione sposo</option>
<option value="7">ristorante</option>
<option value="12">varie</option>
</select>
</td>
</tr>
</table>
</form>
HI, in a situation like this (which is an example, there are many selects and other inputs) posting this form would give a $_POST like this
array {
date => "2010/08/09"
input1 => "bla"
input3 => "bla2"
//list of selection
1 => 2
2 => 4
3 => 5
//ends list of selection
input 4 => "bla4"
}
Can I directly from the HTML form put the <select>
s in seperate array since they represent a grouped array?
array {
date => "2010/08/09"
input1 => "bla"
input3 => "bla2"
//list of selection
array {
1 => 2
2 => 4
3 => 5
}
//ends list of selection
input 4 => "bla4"
}
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这:
会返回:
猜猜这就是您要找的东西? :-)
This:
Would return:
Guess that's what you're looking for? :-)