Note that there are some explanatory texts on larger screens.

plurals
  1. POgetting values from table when checkbox is checked php
    primarykey
    data
    text
    <p>I have this code to show my table:</p> <pre><code> &lt;form action="&lt;?php echo $_SERVER['PHP_SELF'] ?&gt;" method="POST"&gt; &lt;table cellspacing='0'&gt; &lt;?php if(isset($_GET["ordem"])){ if($_GET["ordem"] == 'descendente'){ echo "&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;a title='Ordenar por título' href='visualizarVoucher.php'&gt;Utilizador&lt;/a&gt;&lt;/th&gt;"; echo "&lt;th&gt;Email&lt;/th&gt;"; echo "&lt;th&gt;Voucher&lt;/th&gt;"; echo "&lt;th&gt;Categoria&lt;/th&gt;"; echo "&lt;th&gt;Preço&lt;/th&gt;"; echo "&lt;th&gt;Confirmação&lt;/th&gt;"; echo "&lt;th&gt;Enviar mail&lt;/th&gt;"; echo "&lt;/tr&gt;&lt;/thead&gt;"; } elseif($_GET["ordem"] == 'ascendente'){ echo "&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;a title='Ordenar por título' href='visualizarVoucher.php?ordem=descendente'&gt;Utilizador&lt;/a&gt;&lt;/th&gt;"; echo "&lt;th&gt;Email&lt;/th&gt;"; echo "&lt;th&gt;Voucher&lt;/th&gt;"; echo "&lt;th&gt;Categoria&lt;/th&gt;"; echo "&lt;th&gt;Preço&lt;/th&gt;"; echo "&lt;th&gt;Confirmação &lt;/th&gt;"; echo "&lt;th&gt;Enviar mail&lt;/th&gt;"; echo ("&lt;/tr&gt;&lt;/thead&gt;"); } } else{ echo "&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;a title='Ordenar por título' href='visualizarVoucher.php?ordem=ascendente'&gt;Utilizador&lt;/a&gt;&lt;/th&gt;"; echo "&lt;th&gt;Email&lt;/th&gt;"; echo "&lt;th&gt;Voucher&lt;/th&gt;"; echo "&lt;th&gt;Categoria&lt;/th&gt;"; echo "&lt;th&gt;Preço&lt;/th&gt;"; echo "&lt;th&gt;Confirmação&lt;/th&gt;"; echo "&lt;th&gt;Enviar mail&lt;/th&gt;"; echo("&lt;/tr&gt;&lt;/thead&gt;"); } while($stmt-&gt;fetch()){ echo("&lt;tbody&gt;"); echo("&lt;tr&gt;&lt;td&gt;$nomeUser&lt;/td&gt;"); echo("&lt;td&gt;$email&lt;/td&gt;"); echo("&lt;td&gt;$nomeVoucher&lt;/td&gt;"); echo("&lt;td&gt;$categoria&lt;/td&gt;"); echo("&lt;td&gt;$preco&lt;/td&gt;"); echo("&lt;td&gt;$confirmacao&lt;/td&gt;"); $content = file_get_contents($file,$filePDF); echo("&lt;td&gt;&lt;INPUT TYPE='checkbox' NAME='mail[]' multiple='yes'&gt;&lt;/td&gt;"); echo("&lt;/tr&gt;"); echo("&lt;/tbody&gt;"); }$stmt-&gt;close(); ?&gt; </code></pre> <p>I have a checkbox in my table and I would like to know how can I get the values of each rows from the table when i selected the checkbox. I want to send email when the user selected multiple checkbox. Thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload