SHARE
TWEET

Untitled

a guest Oct 4th, 2017 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. HEADER.php
  2. <?php
  3.     $dbserver = "localhost";
  4.     $dbuser = "root";
  5.     $dbpass = "";
  6.     $dbname = "ma020378";
  7.     $connection = mysqli_connect("$dbserver","$dbuser","$dbpass","$dbname") or die(mysqli_error());
  8.  
  9.  
  10. //mysql_connect('sulley.cah.ucf.edu', 'ma020378', 'C9CA99517B5543F1B96B312B1C30F9D5');
  11.  
  12. //mysql_connect_db('ma020378');
  13.  
  14.  
  15.  
  16. $sql = "SELECT * FROM products";   
  17. $result = mysqli_query($connection, $sql);
  18.  
  19.  
  20. ?>
  21.  
  22.  
  23.  
  24. HOME.php
  25.  
  26. <?php
  27. include_once "header.php";
  28. $result->fetch_assoc();
  29.  
  30.  
  31.  
  32. ?>
  33.  
  34.  
  35. <!DOCTYPE html>
  36. <html>
  37. <head>
  38.     <title></title>
  39.     <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  40.     <link rel="stylesheet" type="text/css" href="styles.css">
  41.     <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
  42. </head>
  43. <body>
  44.  
  45. <div class="col-md-3">
  46.                             <div class="content-box">
  47.                                 <img class="product-img" src="http://via.placeholder.com/200x200" width="200px" height="200px">
  48.                                 <p class="product-info"> <?php
  49.                                     echo $result['name'];
  50.                                    
  51.                                     ?> </p>
  52.                                 <p>Price</p>
  53.                             </div>
  54.                         </div>
  55. </body>
  56. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top