Jump to content
Fórum Script Brasil
  • 0

checkbox + php + mysql


buthy

Question

Então galera, utilizo o seguinte código para listar etapas:

while($row = mysql_fetch_array($result)){
                $id = $row['id'];
                $descricao = $row['descricao'];
                            
                echo '<div style="border:1px dashed #fff; margin-bottom:5px; padding:5px 5px 5px 5px" class="divHover">';
                echo '<div style="float:left; width:30px;">';
                echo '<input name="" type="checkbox" value="'.$id.'"/>';
                echo '</div>';
                echo '<div style="float:left; font-size:12px; margin-top:5px; width:90%;">';
                echo $descricao;
                echo '</div>';
                echo "<div style='clear:both'></div>";
                echo '</div>';
        }

Nunca trabalhei com checkbox antes...

Queria saber como eu salvaria estes checkboxes em uma nova tabela do banco de dados...

E como ficaria o name deles, já que no caso as etapas são puxadas do BD, e também podem ser adicionadas novas etapas, alem de poder excluir...

Obrigado

Até mais!

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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...