modal bootstrap

0

I am trying to get the data to be stored in a MySQL database.

I'm trying to call a modal on my index page and it's not working, I already looked for the solution and I could not find either.

At the beginning of the page I already have a include with the header and inside the header I'm already including the Bootstrap Javascript file.

<!-- Seleciona os dados no mysql -->
<?php 
    $chamada = "SELECT id, produto, pedido, status from PEDIDO";
    $dados = mysqli_query($conexao, $chamada) or die(mysqli_error());
?>

<section class="news">
    <div class="page-reader">
        <h3>Lista de Pedidos <small>atualizado em <?= date("d/m/Y") ?></small></h3>
    </div>
    <table class="table table-striped">
        <tr>
            <td>ID</td>
            <td>Produto</td>
            <td>Código do Pedido</td>
            <td>Situação</td>
            <td>Editar Pedido</td>

            <!-- Coloca os dados em um Array -->
            <?php 
                while ($resultado = mysqli_fetch_assoc($dados)) { 
            ?>
                </tr>
                    <td><?= $resultado['id']; ?></td>
                    <td><?= $resultado['produto']; ?></td>
                    <td><?= $resultado['pedido']; ?></td>
                    <td><?= $resultado['status']; ?></td>
                    <td><button class="btn btn-primary" data-toggle="modal" 
                                data-target="#myModal">Confirmar</button> <button class="btn btn-danger">Cancelar</button></td>
            <?php
                }
            ?>
    </table>
</section>

<!-- Modal -->
<div class="modal fade" id="myModal" 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-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">Modal title</h4>
            </div>
            <div class="modal-body">
                ...
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                <button type="button" class="btn btn-primary">Save changes</button>
            </div>
        </div>
    </div>
</div>
    
asked by anonymous 13.03.2015 / 14:14

0 answers