Skip to content

Instantly share code, notes, and snippets.

--
-- Table structure for table `tbl_products`
--
CREATE TABLE `tbl_products` (
`id` int(11) NOT NULL,
`product_name` varchar(500) NOT NULL,
`price` varchar(500) NOT NULL,
`category` varchar(500) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
<!-- Here is a basic HTML table -->
<table>
<tr>
<th>ID</th>
<th>Name</th>
<th>Power Rating</th>
<th>Created on</th>
</tr>
<!-- A foreach loop creates an array that we can then use to loop through -->
<?php foreach ($records as $record) : ?>
// Get data from database
// Replace 'your-table' with the name of your own table
$query = "SELECT * FROM your-table";
$statement = $db->prepare($query);
$statement->execute();
$heros = $statement->fetchAll(PDO::FETCH_ASSOC);
$statement->closeCursor();
--
-- Table structure for table `user_data`
--
CREATE TABLE `user_data` (
`id` int(5) NOT NULL,
`username` varchar(25) NOT NULL,
`email` varchar(25) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
COMMIT;
CREATE TABLE IF NOT EXISTS `tbl_users` (
`user_id` int(11) NOT NULL AUTO_INCREMENT,
`user_name` varchar(25) NOT NULL,
`user_password` varchar(255) NOT NULL,
PRIMARY KEY (`user_id`)
)
CREATE TABLE `boxers` (
`boxerID` int(11) NOT NULL,
`boxerName` varchar(20) NOT NULL,
`weight` varchar(50) NOT NULL,
`boxerPic` varchar(200) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `boxers` (`boxerID`, `boxerName`, `weight`, `boxerPic`) VALUES
(1, 'George Forman', 'Heavyweight', '895803.jpg'),
To add animations with no scroll - just use animated in the class e.g.
<h1 class="animated infinite bounce">Example</h1>
To use WOW scroll to animate - just use wow in the class e.g.
<div class="wow bounceInUp">
Content to Reveal Here
</div>
-- Table structure for table `products`
--
CREATE TABLE `products` (
`productID` int(11) NOT NULL,
`categoryID` int(11) NOT NULL,
`productCode` varchar(10) NOT NULL,
`productName` varchar(255) NOT NULL,
`date` date NOT NULL,