Jump to content
Fórum Script Brasil
  • 0

(Resolvido)Dúvida com checkbox.


Paulo Campos 01

Question

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 by Paulo Campos 01
Link 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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...