CREATE TABLE `user` ( `userid` INT(11) NOT NULL AUTO_INCREMENT, `firstname` VARCHAR(30) NOT NULL, `lastname` VARCHAR(30) NOT NULL, `address` VARCHAR(150) NOT NULL, `birthdate` DATE NOT NULL, PRIMARY KEY (`userid`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `user` (`firstname`, `lastname`, `address`, `birthdate`) VALUES ('neovic', 'devierte', 'silay city', '1992-06-23'), ('lee', 'ann', 'silay city', '1990-01-01'), ('dee', 'dee', 'talisay city', '1996-08-09'), ('julyn', 'divinagracia', 'bacolod city', '1992-04-09');
<?php // Check connection { } ?>
<!DOCTYPE html> <html lang="en"> <head> <link href="bootstrap.min.css" rel="stylesheet"> <link href="dataTables.bootstrap.css" rel="stylesheet"> <link href="dataTables.responsive.css" rel="stylesheet"> <style> .mytable{ margin-left:50px; margin-top:30px; width:1000px; } </style> </head> <body> <br> <div class="mytable"> <table width="100%" class="table table-striped table-bordered table-hover" id="dataTables-example"> <thead> <tr> </tr> </thead> <tbody> <?php include('conn.php'); $query=mysqli_query($conn,"select * from `user`"); while($row=mysqli_fetch_array($query)){ ?> <tr> </tr> <?php } ?> </tbody> </table> </div> <script> $(document).ready(function() { $('#dataTables-example').DataTable({ responsive: true }); }); </script> </body> </html>
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.
Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.
FOR YOUR OWN SAFETY, PLEASE:
1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.