【发布时间】:2013-03-01 21:15:22
【问题描述】:
我通过一个从我制作的 MySQL 数据库中获取数据的表单来显示我检查的每篇文章的数量时出现问题。
这是我的代码:
<?php foreach ($results_articles as $input) : ?>
<input type="text" name="<?php echo $input->id_article; ?>_txtbox[]" style="text-align: center; width:30px;"></input>
<input
type="checkbox"
name="checked_articles[]"
value="<?php echo $input->id_article; ?>">
<?php echo "(".
($input->ref_article).")".
($input->nom_article)." (".
($input->prix_article)." €)"; ?><br>
<?php endforeach; ?>
所以,“checked_articles”在我的下一页正确显示;但是我真的不知道如何显示每条检查的数量。
我需要你的帮助!
谢谢!如果您有任何其他信息,我当然会回复!
【问题讨论】:
-
“每篇文章的数量”是什么意思?也许您提到了已检查的文章总数?
-
@Hast :不,我的意思是我可以为每篇文章加上一个数字……这叫数量! ^^'
标签: php mysql forms checkbox foreach