1

I need a help from you and i know, it will be basic a subject for this website members :)

So, i am doing a php project and created a checkbox table. This table getting datas from MySQL.

I wanna transfer of checked rows to another php file. How can i fix it?

           <form action="table3.php" method="POST" id="demo-form2" data-parsley-validate class="form-horizontal form-label-left">

            <div class="x_content">


                <div class="table-responsive">
                    <table class="table table-striped jambo_table bulk_action">
                        <thead>
                            <tr class="headings">
                                <th>
                                    <input type="checkbox" id="secim" class="flat">
                                </th>
                                <th class="column-title">ID Number </th>
                                <th class="column-title">Name and Surname </th>
                                <th class="column-title">Departman </th>
                                <th class="column-title">Starting Date </th>
                                <th class="column-title">Social Number </th>
                                </th>
                                <th class="bulk-actions" colspan="7">
                                    <a class="antoo" style="color:#fff; font-weight:500;">Bulk Actions ( <span class="action-cnt"> </span> ) <i class="fa fa-chevron-down"></i></a>
                                </th>
                            </tr>
                        </thead>

                        <tbody>
                            <?php
                            while ($personelcek = $personelsor->fetch(PDO::FETCH_ASSOC)) { ?>
                                <tr class="even pointer">
                                    <td class="a-center ">
                                        <input type="checkbox" class="flat">
                                    </td>
                                    <td name="personel_sicil"> <?php echo $personelcek['personel_sicil']; ?></td>
                                    <td name="adsoyad"><?php echo $personelcek['personel_adsoyad']; ?></td>
                                    <td name="departman"><?php echo $personelcek['personel_departman']; ?></td>
                                    <td name="giristarihi"><?php echo $personelcek['personel_giris']; ?></td>
                                    <td name="ssk"><?php echo $personelcek['personel_ssk']; ?></td>
                                    </td>
                                </tr>
                            <?php   }


                            ?>


                        </tbody>
                        <div align="right" class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
                            <button type="submit" name="seciliform" class="btn btn-success">İzin Formu Oluştur</button>
                        </div>
                    </table>
                </div>
            </div>
    </div>
</div>
birisigenc
  • 11
  • 1
  • First, give the checkbox a `name` attribute. You can do this in a couple of ways, but the easiest it probably the array syntax. So try `name="sicil[]"` and set the value to the ID `value=""`. (I'm guessing on your column names, update as needed.) Next, for demo purposes, change the form from POST to GET, checking some boxes and look at the URL. You should see a comma-separated list of IDs. Finally, switch back to POST and see this for how to read it: https://stackoverflow.com/a/3314581/231316 – Chris Haas Jul 19 '22 at 19:03

0 Answers0