Skip to content

Instantly share code, notes, and snippets.

@bmackenty
Last active September 25, 2020 07:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bmackenty/0322faef3388e3f8a459aaa2a97647ed to your computer and use it in GitHub Desktop.
Save bmackenty/0322faef3388e3f8a459aaa2a97647ed to your computer and use it in GitHub Desktop.
<!doctype html>
<!-- This file should be named store_database_example.php -->
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
</head>
<body>
<!-- =========================================== -->
<!-- PLEASE DO NOT EDIT ANYTHING ABOVE THIS LINE -->
<!-- =========================================== -->
<?php
include('store_navbar.php');
include('database_inc.php');
?>
<div class="container mt-5">
<div class="row">
<div class="col-12 text-center">
<h2>Welcome to our online store!</h2>
</div>
</div>
<?php
$query = mysqli_query($connect, "SELECT * from items;");
while ($row = mysqli_fetch_array($query))
{
echo $row['id'];
echo "<br />";
echo $row['description'];
echo "<br />";
echo $row['size'];
echo "<br />";
echo $row['price'];
echo "<br />";
echo $row['image'];
echo "<br />";
}
?>
</div> <!-- close the container -->
<footer class="footer mt-auto mt-4 py-3 bg-secondary text-white text-center">
<div class="container">
<span >Thank you for visiting our site. :-) </span>
</div>
</footer>
<!-- =========================================== -->
<!-- PLEASE DO NOT EDIT ANYTHING BELOW THIS LINE -->
<!-- =========================================== -->
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment