0
Good afternoon to all,
I am implementing an edit form (modal) that has an 'edit' link and that when clicked opens a modal form. The big problem is that I am not able to assimilate the link 'Edit' and bring each line of the BD to the modal form to be edited. I thank you from now on.
<h1 class="title"><i class="fa fa-gears fa-2x"></i> PAINEL ADMINISTRATIVO / PRODUTOS </h1>
<table class="table table-hover">
<thead>
<tr>
<th>Produto</th>
<th>Tipo</th>
<th>R$ Preço</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<?php foreach($prod as $get_prods): ?>
<td><?php echo $get_prods->produto; ?></td>
<td><?php echo $get_prods->tipo; ?></td>
<td><?php echo $get_prods->preco; ?></td>
<td><a href="#box-editar" data-toggle="modal" data-target="#box-editar"><i class="fa fa-pencil "></i> Editar</a></td>
</tr>
<?php endforeach; ?>
</tbody>
</table><br />
<!-- Modal editar -->
<div class="modal fade" id="box-editar" tabindex="-1" role="dialog" aria-labelledby="boxLabel" aria-hidden="true">
<div class="modal-dialog modal-md">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="boxLabel"><i class="fa fa-pencil "></i> Editar Produto</h4>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" onclick='' data-dismiss="modal">Salvar alterações</button>
</div>
</div>
</div>
</div>
select no bd is working well I can bring all the information, the big problem and with the link 'edit' q opens a modal, I am not able to assimilate this link with each line q comes from the bank to make the edition
– Flavio Domingos