Get table row ID to load Modal for tender

Asked

Viewed 292 times

0

Good afternoon Personal,

After all this research and not being able to understand how it works, I’m trying to solve a problem that I’m having.

I am creating a register of service providers, but I found myself in lack of knowledge:

I created a table that loads the data of the providers with a column with the change/ remove buttons.

<div class="dataTable_wrapper">
                          <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                            <thead>
                                <tr>
                                    <th>Nome</th>
                                    <th>CPF</th>
                                    <th>RG</th>
                                    <th>Telefone</th>
                                    <th>
                                        <i class='fa fa-pencil fa-fw'></i>
                                    </th>
                                    <th>
                                        <i class='fa fa-remove fa-fw'></i>
                                    </th>
                                    <th>
                                        <i class='fa fa-sign-out fa-0.5x'></i>
                                    </th>
                                </tr>
                                <thead>
                               <tbody>
                               <?php include ("resultado.php"); ?>
                                </tbody>
                            </table>
                        </div>

Below I created a modal to open a window to change the provider data based on its ID that will be obtained from the selected line, all the HTML is in a PHP that is called internally in the modal.

<div class="modal fade" id="ModalAlterar" tabindex="-1" role="dialog" aria-hidden="true">
                                <div class="modal-dialog">
                                  <?php include "prestadores_alterar.php"?>
                                    <!-- /.modal-content -->
                                </div>
                                <!-- /.modal-dialog -->
                            </div>

The question is, how do I load this modal with the line data that’s in the database?

Thanks so much for your help.

  • Can someone help me?

  • How do you load your table? A suggestion would be +- equal to that question. http://answall.com/questions/65204/criar-um-link-que-ao-ser-clicado-pego-o-seu-texto/65209#65209

  • 1 makes the connection to the database, 2 makes a query to select the data, 3 puts the query result in the modal. These are your difficulties?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.