<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://www.jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://www.jackxiang.com/post//</link>
<title><![CDATA[php怎么接收多选的select框？]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Thu, 09 Jul 2009 06:18:31 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	多选select 的name必须是一个name_value[],后面有这个中括号，为哈？<br/>如果不是中括号的话，你用httpfox抓下包，<br/>select&nbsp;&nbsp;1<br/>select&nbsp;&nbsp;2<br/>select&nbsp;&nbsp;3<br/><br/>php他会得到一个值，也就是多选最下面的那个值，而在加上中括号后呢，就会出现如下：<br/>select[]&nbsp;&nbsp;1<br/>select[]&nbsp;&nbsp;2<br/>select[]&nbsp;&nbsp;3<br/><br/><br/>select.html<br/><div class="code"><br/>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;<br/>&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;<br/>&lt;head&gt;<br/>&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;<br/>&lt;title&gt;提交多选的静态页&lt;/title&gt;<br/>&lt;/head&gt;<br/><br/>&lt;body&gt;<br/>&lt;form id=&quot;post_form&quot; name=&quot;post_form&quot; method=&quot;post&quot; action=&quot;./select.php&quot;&gt;<br/>&nbsp;&nbsp;&lt;select name=&quot;select&#91;&#93;&quot; size=&quot;10&quot; multiple=&quot;multiple&quot; id=&quot;select&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;1&quot;&gt;1&lt;/option&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;2&quot;&gt;2&lt;/option&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;3&quot;&gt;3&lt;/option&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;4&quot;&gt;4&lt;/option&gt;<br/>&nbsp;&nbsp;&lt;/select&gt;<br/>&nbsp;&nbsp;&lt;label&gt; &lt;br /&gt;<br/>&nbsp;&nbsp;&lt;input type=&quot;submit&quot; name=&quot;button&quot; id=&quot;button&quot; value=&quot;提交&quot; /&gt;<br/>&nbsp;&nbsp;&lt;/label&gt;<br/>&lt;/form&gt;<br/>&lt;/body&gt;<br/>&lt;/html&gt;<br/></div><br/><br/><div class="code"><br/>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;<br/>&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;<br/>&lt;head&gt;<br/>&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;<br/>&lt;title&gt;PHP接收多选是一个数组&lt;/title&gt;<br/>&lt;/head&gt;<br/>select.php<br/>&lt;body&gt;<br/><br/>&lt;?php<br/>print_r($_POST&#91;&#039;select&#039;&#93;);<br/><br/>?&gt;<br/><br/>&lt;/body&gt;<br/>&lt;/html&gt;<br/><br/><br/></div><br/><br/>这样PHP得到：<br/><br/>Array<br/>(<br/>&nbsp;&nbsp;&nbsp;&nbsp;[0] => 1<br/>&nbsp;&nbsp;&nbsp;&nbsp;[1] => 2<br/>&nbsp;&nbsp;&nbsp;&nbsp;[2] => 3<br/>)<br/><br/><br/>
]]>
</description>
</item><item>
<link>http://www.jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] php怎么接收多选的select框？]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>