<input type="checkbox" name="other" <?php if $_POST['other']?>checked<?php if?> />
解决方案 »
- Fatal error: Function name must be a string in
- 如何用php的md5()或者sha1()验证文件是否相同呢
- PHP输出图片后,字体文件一直处于打开状态
- 淘宝网各种代码,需要的朋友可以去拿
- php代码问题
- 关于JS中assign的问题
- 之前的问题:用什么方式来实现指定的电脑才可以登录,mac地址限制/ip地址限制/证书/控件等等什么方式可以?
- 用PHP添加系统用户
- PHP建立了一个Class后,怎样手动删除这个class
- PHP中有無類似asp中session這樣的會話變量.
- 下载了一个源码测试出现很多undefined 参数啊怎办?
- 像新浪微博那样子,发表文章之后,页面不转跳,文章自动显示在第一行是如何做到的啊?
<form action="2.php" method="post">
<input type="checkbox" name="test[]" value="person" />1<br>
<input type="checkbox" name="test[]" value="company" />2<br>
<input type="checkbox" name="test[]" value="services" />3<br>
<input type="checkbox" name="test[]" value="other" />4
<input type="submit" name="sub" />php页面:
print_r($_POST['test']); //就是选择的值
<input type="checkbox" name="test[]" value="person" />1<br>
<input type="checkbox" name="test[]" value="company" />2<br>
<input type="checkbox" name="test[]" value="services" />3<br>
<input type="checkbox" name="test[]" value="other" />4
<input type="submit" name="sub" />php页面:
print_r($_POST['test']); //就是选择的值,用作测试在2.php页面,用$_GET['checkboxSelected']获取值
不知道为什么使用你这个之后,它不提交到2.php 总是问我打开,保存什么的,
是不是dreamweaver2004mx的问题啊?
html
<input type="checkbox" name="weeks[]" id="weeks" value=1>
<input type="checkbox" name="weeks[]" id="weeks" value=2>
<input type="checkbox" name="weeks[]" id="weeks" value=3> php
$weeks = $_POST['weeks'];
for($i=0;$i<count($weeks);$i++)
echo $weeks[1]."<br>";