Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <br/>
- <table class="table table-bordered table-hover">
- <thead>
- <tr>
- <th>ID</th>
- <th>Megrendelő neve:</th>
- <th>Megrendelő lakcíme:</th>
- <th>Megrendelő telefonszáma:</th>
- <th>Megrendelő e-mail címe:</th>
- <th>Művelet:</th>
- </tr>
- </thead>
- <tbody>
- <?php
- include './config.php';
- $res=$conn->query("select * from megrendelok");
- while ($row = $res->fetch_assoc()) {
- ?>
- <tr>
- <td><?php echo $row['id']; ?></td>
- <td><?php echo $row['megrendelonev']; ?></td>
- <td><?php echo $row['megrendelocim']; ?></td>
- <td><?php echo $row['megrendelotel']; ?></td>
- <td><?php echo $row['megrendelomail']; ?></td>
- <td> <a class="btn btn-warning btn-sm" data-toggle="modal" data-target="#myModal<?php echo $row['id']; ?>">
- <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a>
- <a class="btn btn-danger btn-sm"
- data-toggle="modal" data-target="#myModal">
- <span class="glyphicon glyphicon-trash" aria-hidden="true"></span></a>
- <!-- Modal -->
- <div class="modal fade" id="myModal<?php echo $row['id']; ?>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel<?php echo $row['id']; ?>">
- <div class="modal-dialog" role="document">
- <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="myModalLabel<?php echo $row['id']; ?>">Megrendelő adatainak szerkesztése</h4>
- </div>
- <div class="modal-body">
- <form>
- <div class="form-group">
- <label for="nev">Megrendelő neve</label>
- <input type="text" class="form-control" id="nev<?php echo $row['id']; ?>" value="<?php echo $row['megrendelonev']; ?>">
- </div>
- <div class="form-group">
- <label for="cim">Megrendelő címe</label>
- <input type="text" class="form-control" id="cim<?php echo $row['id']; ?>" value="<?php echo $row['megrendelocim']; ?>">
- </div>
- <div class="form-group">
- <label for="tel">Megrendelő telefonszáma</label>
- <input type="text" class="form-control" id="tel<?php echo $row['id']; ?>" value="<?php echo $row['megrendelotel']; ?>">
- </div>
- <div class="form-group">
- <label for="mail">Megrendelő e-mail címe</label>
- <input type="text" class="form-control" id="mail<?php echo $row['id']; ?>" value="<?php echo $row['megrendelomail']; ?>">
- </div>
- <div class="form-group">
- <label for="akti">Aktív</label>
- <input type="text" class="form-control" id="aktiv<?php echo $row['id']; ?>" value="<?php echo $row['aktiv']; ?>">
- </div>
- </form>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Mégsem</button>
- <button id="updatedata"type="button" onclick="updatedata('<?php echo $row['id']; ?>')"class="btn btn-primary">Módosítások mentése</button>
- </div>
- </div>
- </div>
- </div>
- </td>
- </tr>
- </td>
- <?php
- }
- ?>
- </tr>
- </tbody>
- </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement