【发布时间】:2010-11-08 17:35:13
【问题描述】:
我似乎无法理解为什么我不能使用以下代码传递任何值:
<div class="menu">
Por favor seleccione os conteúdos:
<form name="Categorias" action="Elementos_Descritivos.php" method="post">
<?php
$Categorias = array ("Nome", "Data", "Cliente", "Observacoes");
foreach( $Categorias as $key => $value){
echo "<div class=\"cb-row\">
<label for=\"$value\">$value:</label>
<input id=\"$value\" $value=\"$value\" type=\"checkbox\" value=\"$value\" checked />
</div>";
}
?>
<div class="submit">
<input type="submit" value="Seguinte" />
</div>
</form>
</div>
</div>
在 Elemento_Descritivos.php 页面中,我拥有的所有代码是:
<?php
print("<pre>");
print_r($_POST);
print("</pre>");
?>
它只是输出:
数组 ( )
【问题讨论】:
标签: php arrays variables post checkbox