Hi there
I have a huge difficulties with php checkbox inside do while loop.
<?php do { ?>
<p>
</p>
<div id="nazwa_firmy">
<form name="szczegoly_firmy" method="post" action="szczegoly.php">
<?php echo $row_wybieranie_firm['nazwa'];?>
<input type="submit" name="firma_szczegoly" id="firma_szczegoly" value="Szczegóły" tabindex="1">
<input type="hidden" name="id_firmy" id="id_firmy" value="<?php echo $row_wybieranie_firm['id']?>">
</form>
</div>
<div id="adres_www">
<a href="http://<?php echo $row_wybieranie_firm['www']; ?>"><?php echo $row_wybieranie_firm['www']; ?></a>
</div>
<form name="kopiowanie_email" method="post" action="email.php">
<div id="adres_email">
<a href="mailto:<?php echo $row_wybieranie_firm['email']; ?>"><?php echo $row_wybieranie_firm['email']; ?></a>
<input type="checkbox" name="zaznaczenie_email[]" id="zaznaczenie_email[]" tabindex="2" value="<?php echo $row_wybieranie_firm['email']; ?>"><label for="zaznaczenie_email"></label>
</div>
<div id="szczegoly">
<?php echo $row_wybieranie_firm['skrot'] . ".";
?>
<?php echo $row_wybieranie_firm['ulica']. " ";
?>
<?php if ($row_wybieranie_firm['dodatkowa_litera'] == ""){
echo $row_wybieranie_firm['nr_domu'] . "," ;}
else{
echo $row_wybieranie_firm['nr_domu'];}
?>
<?php if ($row_wybieranie_firm['dodatkowa_litera'] != ""){
echo "/" . $row_wybieranie_firm['dodatkowa_litera'] . "," ;}
?>
<?php if ($row_wybieranie_firm['nr_lokalu'] != 0){
echo "lok. " . $row_wybieranie_firm['nr_lokalu'] . ",";}
?>
<?php echo substr($row_wybieranie_firm['kod_pocztowy'], 0, 2) . "-" . substr($row_wybieranie_firm['kod_pocztowy'], 2, 3) . " ";
?>
<?php echo $row_wybieranie_firm['miasto'];
?>
</div>
<?php } while ($row_wybieranie_firm = mysql_fetch_assoc($wybieranie_firm));
?>
<p>
</p>
<div id="kopiowanie_email">
<input type="submit" name="kopiuj_email" id="kopiuj_email" value="Kopiowanie email" tabindex="3">
</div>
</form>
</body>
</html>
<?php
mysql_free_result($imie_nazwisko);
mysql_free_result($wybieranie_firm);
?>
Following code generates lot of email addresses with checkbox right side of the email link. I would like to select some of the checkboxex and post the value to the destination site.
For example I would like to select second, third and tenth chceckbox and when I press Kopiowanie email button all tree values will be posted to the second site as array. Currently only last value of the while loop posts to the destination site independently which checkbox I choose.
Please can someone help me?