我尝试了很多以从数据库中获取值并将其放入复选框数组但失败了。请帮助!
* img[] 一直是空的,就像我使用 $_POST(['img']) 调用该部分时没有任何值进入它一样!!* 这是我的代码:
echo " <h2>Select image to delete: <h2>";
$s = mysql_query("SELECT * FROM image WHERE u_id = '$u_id'");
$num = mysql_num_rows($s);
if($s)
{
?>
<form name="f1" method="post" action="">
<?php
while($row = mysql_fetch_array($s))
{
?>
<input type="checkbox" name="img[]" value="<?php $row['path'] ;?>" />
<img width="100" src="<?php echo $row['path']." ";?>">
<?php
}
?>
<br />
<br />
<input type="submit" name= "subDel" value = "Delete" />
</form>
<?php
}