[Resolvido] acessar indices de array usando checkbox dinamicos
estes checkbox abaixo saem com o mesmo id e name... e o value recebe um codigo
<?php
foreach($lista as $key => $produto){
?>
<div style="width:295px; height:100px; border-top:1px dotted;">
<input value="<?php echo $produto->getCodigo();?>" id="chkProduto" name="chkProduto" type="checkbox" style="position:relative; bottom:40px; left:3px;"/>
<img src="<?php echo $produto->getFoto(); ?>" style=" height:96px; width:96px; margin-top:2px; margin-left:2px;" />
<label style="text-decoration:underline; position:relative; bottom:70px; left:25px;"><?php echo $produto->getNome(); ?></label><br/>
<label style="color:#FF0000; position:relative; bottom:50px; left:150px;">R$<?php echo $produto->getValor();?></label><br/>
<input type="hidden" id="txtCodigoProduto" />
</div>
<?php
}
?>
alguem tem uma solucao pratica pra eu pegar os $_POST destes checkbox para acessar indices do vetor $lista?Discussão (7)
Carregando comentários...