【发布时间】:2012-02-16 03:20:18
【问题描述】:
当我尝试加载页面时出现此错误:注意:未定义变量:C:\wamp\www\vitamin-k-tracker\testing-form-checkboxes.php 中的行 3
我认为 $_POST[ $row["id"] ] 中存在一些错误,因为它太基础了。
<?php
if (isset($_POST[ $row["id"] ]) && !empty($_POST[ $row["id"] ])){
print_r($_POST);
}
?>
<form action="testing-form-checkboxes.php" method="POST">
<?php $row["id"]= 'a'; ?>
<input type="checkbox" name="<?php echo $row["id"]; ?>" value="aa" />
<br /><br />
<input type="submit" value="Add Food to my Meal Planner Queue">
</form>
【问题讨论】: