Código
<?php include ("conexion.php"); $sql = "SELECT * FROM baby_names"; $records = mysql_query($sql) or die (mysql_error()); ?> <!DOCTYPE HTML> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="css/bootstrap.css"> <link rel="stylesheet" href="css/login.css"> </head> <body> <nav class="navbar navbar-default"> <div class="container-fluid"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> </button> </div> <ul class="nav navbar-nav navbar-right"> <li class="dropdown"> <ul class="dropdown-menu" role="menu"> </ul> </li> </ul> <ul class="nav navbar-nav navbar-right"> <li class="dropdown"> <ul class="dropdown-menu" role="menu"> </ul> </li> </ul> <ul> <ul class="nav navbar-nav navbar-right"> <ul> </nav> <div class="container"> <div class="row"> <div class="col-md-3"> <ul class="nav nav-pills nav-stacked"> </ul> </div> <div class="col-md-9 well"> <div> <form method="POST" class="navbar-form navbar-left" action="add_kids.php"> <input type="text" class="form-control" placeholder="search"> <br/> <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"> </div> <div class="modal-body"> <form method="POST" action="add_kids.php" > <div class="form-group"> <input type="text" class="form-control" name="bby-name"> </div> <div class="form-group"> <select class="form-control" name="Gender"> </select> </div> <div class="form-group"> <input type="text" class="form-control" name="phone"> </div> <div class="form-group"> <input type="text" class="form-control" name="parents_name"> </div> </form> </div> <div class="modal-footer"> </div> </div> </div> </div> </form> </div> </div> </div> <!-- Tab panes --> <div class="container" id="name"> <ul class="nav" role="tablist"> </ul> <!-- Tab panes --> <div class="tab-content" id="table2"> <div class="table-responsive"> </br> <table class="table table-hover"> <thead> <tr> </tr> <?php while($row = mysql_fetch_assoc($records)) { echo "<tr>"; echo "<td><button type='submit' name='edit' class='btn btn-warning'><a href='edit.php' id='button'><span class='glyphicon glyphicon-edit'></span> Edit</a></button> <button type='submit' name='delete' class='btn btn-danger'><a href='delete.php' id='button'><span class='glyphicon glyphicon-trash'></span> Delete</a></button></td>"; echo''; echo "<tr>"; }//endwhile ?> </thead> <tbody> </tbody> </table> </div> </div> </div> </body> </html>
Código
<?php include_once("conexion.php"); ?>