Created
March 6, 2014 15:22
-
-
Save facilita-tecnologia/9392019 to your computer and use it in GitHub Desktop.
Exemplo de modal para edição de registro com php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table> | |
<thead> | |
<tr> | |
<th>ID</th> | |
<th>Nome</th> | |
<th>Placa</th> | |
<th></th> | |
</tr> | |
</thead> | |
<tbody> | |
<!--Teu laço--> | |
<tr> | |
<td><?php echo $row[vei_id]; ?></td> | |
<td><?php echo $row[vei_nome]; ?></td> | |
<td><?php echo $row[vei_placa]; ?></td> | |
<td> | |
<button class="btn btn-primary" data-toggle="modal" data-target="#myEditar_<?php echo $row[vei_id]; ?>">Editar</button> | |
<!-- Modal Edição de Registro --> | |
<div class="modal fade" id="myEditar_<?php echo $row[vei_id]; ?>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> | |
<div class="modal-dialog"> | |
<div class="modal-content"> | |
<div class="modal-header"> | |
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | |
<h4 class="modal-title" id="myModalLabel">Editar Registro</h4> | |
</div> | |
<div class="modal-body"> | |
<input type="text" class="form-control" value="<?php echo $row[vei_nome]; ?>" id="exampleInputEmail1" placeholder="Nome"> | |
<input type="text" class="form-control" value="<?php echo $row[vei_placa]; ?>" id="exampleInputEmail1" placeholder="Placa"> | |
</div> | |
<div class="modal-footer"> | |
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button> | |
<button type="button" class="btn btn-primary">Salvar</button> | |
</div> | |
</div> | |
</div> | |
</div> | |
</td> | |
</tr> | |
</tbody> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment