Paulo Campos 01 Posted October 23, 2012 Report Share Posted October 23, 2012 (edited) Se eu marco mais de uma, ele leva a id somente da última.O que pode ser ?echo '<table>'; echo '<form name="selecao" action="index.php?url=relatorio&acao=protocolo" method="post">'; echo '<tr>'; echo '<td class="header"><input type=checkbox name="selall" onclick="CheckAll()"> Todos</td>'; echo '<td class="header">Vencimento</td><td class="header" style="width:600">Fornecedor</td><td class="header">Valor</td>'; echo '</tr>'; $sql="select id, date_format(data,'%d/%m/%Y') as data, nome, valor from conta where data between '$datai' and '$dataf' ORDER BY data ASC"; $dados=$this->conexaoDB->ExecutaQuery($sql); while ($row=mysql_fetch_array($dados)) { $id = $row['id']; $vencimento = $row['data']; $fornecedor = $row['nome']; $valor = $row['valor']; echo '<tr>'; echo "<td><input type=checkbox name='PC' value=".$id."></td><td>".$vencimento."</td><td>".$fornecedor."</td><td>".$valor."</td>"; echo '</tr>'; } echo '<td><input type="Submit" value="Enviar" /></td>'; echo '</form>'; echo '</table>'; Edited October 23, 2012 by Paulo Campos 01 Quote Link to comment Share on other sites More sharing options...
0 ESerra Posted October 23, 2012 Report Share Posted October 23, 2012 Óbvio, todos os checkbox estão com mesmo nome... ou você coloca nomes diferentes ou usa um array, name='PC[]' Quote Link to comment Share on other sites More sharing options...
0 Paulo Campos 01 Posted October 23, 2012 Author Report Share Posted October 23, 2012 Consegui amigo, nunca tinha feito, sou novato.Obrigado pela informação. Quote Link to comment Share on other sites More sharing options...
Question
Paulo Campos 01
Se eu marco mais de uma, ele leva a id somente da última.
O que pode ser ?
Edited by Paulo Campos 01Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.