欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

php簡(jiǎn)單獲取復(fù)選框值的方法

 更新時(shí)間:2016年05月11日 11:06:39   作者:果凍  
這篇文章主要介紹了php簡(jiǎn)單獲取復(fù)選框值的方法,簡(jiǎn)單分析了php以數(shù)組形式傳遞復(fù)選框checkbox值的實(shí)現(xiàn)方法,需要的朋友可以參考下

本文實(shí)例講述了php簡(jiǎn)單獲取復(fù)選框值的方法。分享給大家供大家參考,具體如下:

html:

<form id="form1" name="form1" method="post" action="checkbox.php">
<input type=checkbox name=checkbox[] value="1">
<input type=checkbox name=checkbox[] value="2">
<input type=checkbox name=checkbox[] value="3">
<input type=checkbox name=checkbox[] value="4">
<input type=checkbox name=checkbox[] value="5">
<input type="submit" name="button" id="checkbox" value="提交" />
</form>

php:

<?php
$text1=$_POST['checkbox'];
for($i=0;$i<count($text1);$i++)
{
$yourwant = $text1[$i]; 
echo $yourwant."<br/>";
}
?>

更多關(guān)于PHP相關(guān)內(nèi)容感興趣的讀者可查看本站專題:《php socket用法總結(jié)》、《PHP網(wǎng)絡(luò)編程技巧總結(jié)》、《php curl用法總結(jié)》、《PHP數(shù)組(Array)操作技巧大全》、《PHP數(shù)據(jù)結(jié)構(gòu)與算法教程》、《PHP數(shù)學(xué)運(yùn)算技巧總結(jié)》、《php日期與時(shí)間用法總結(jié)》、《php面向?qū)ο蟪绦蛟O(shè)計(jì)入門教程》、《php字符串(string)用法總結(jié)》、《php+mysql數(shù)據(jù)庫操作入門教程》及《php常見數(shù)據(jù)庫操作技巧匯總

希望本文所述對(duì)大家PHP程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評(píng)論