Advertisement
Guest User

Untitled

a guest
May 3rd, 2017
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.09 KB | None | 0 0
  1. <!DOCTYPE HTML>
  2. <HTML>
  3.  
  4. <HEAD>
  5.  
  6.     <link rel="stylesheet" type="text/css" href="style.css">
  7.     <title>Products | KeyStar</title>
  8.     <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  9.     <script type="text/javascript" src="js.js"></script>
  10.     <link rel="icon" type="image/png" href="favicon-32x32.png" sizes="32x32" />
  11.     <link rel="icon" type="image/png" href="favicon-16x16.png" sizes="16x16" />
  12.  
  13. </HEAD>
  14.  
  15. <BODY>
  16.  
  17.     <div id="nav">
  18.         <nav>
  19.             <ul id="first-list">
  20.                 <div style="position: relative;overflow:hidden;height: 6.6vh;">
  21.                     <li><img src="images\keystar.png" align="right"></li>
  22.                     <li><a href="index.php">HOME</a></li>
  23.                     <li><img src="images\productsicon.png" align="right"></li>
  24.                     <li><a class="active" href="Products.php">PRODUCTS</a></li>
  25.                     <li><img src="images\abouticon.png"  align="right"></li>
  26.                     <li><a href="About.php">ABOUT</a></li>
  27.                     <li><button id="b1" onclick="document.getElementById('id01').style.display='block'" style="width:auto;">Login</button></li>
  28.                 </div>
  29.             </ul>
  30.         </nav>
  31.     </div>
  32.     <div class="top"; style="position: relative; width:100%;">
  33.     </div>
  34.    
  35.     <br>
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44. <?php
  45. $mysqlip = "127.0.0.1";
  46. $username = "root";
  47. $password = "";
  48.  
  49. $connection = new mysqli($mysqlip,$username,$password,"productdb");
  50. $productQuery = $connection->query("SELECT * FROM products");
  51.  
  52. while($row = mysqli_fetch_assoc($productQuery)){
  53.    
  54.     $productName = "Video Card";
  55.     $productPrice = "52342.22";
  56.     echo '
  57.    
  58.         <div id="productContainer">
  59.             <div class="prodCol">
  60.                <div class="column prodBox">
  61.                     <div class="boximg ">
  62.                         <img src="images\box.png" style="width:85%">
  63.                         <div class="text2">
  64.                             <p class="prodName">'.$productName.'</p>
  65.                             <p class="prodPrice">$'.$productPrice.'</p>
  66.                         </div>
  67.                     </div>
  68.                 </div>
  69.             </div>
  70.         </div>
  71.    
  72.     ';
  73. }
  74. ?>
  75.  
  76.  
  77.  
  78.  
  79.    
  80. <script>
  81.     // Get the modal
  82. var modal = document.getElementById('id01');
  83.  
  84. // When the user clicks anywhere outside of the modal, close it
  85. window.onclick = function(event) {
  86.     if (event.target == modal) {
  87.         modal.style.display = "none";
  88.     }
  89. }
  90. </script>
  91.  
  92. <div id="id01" class="modal">
  93.  
  94.   <form class="modal-content animate" action="/action_page.php">
  95.     <div class="imgcontainer">
  96.       <span onclick="document.getElementById('id01').style.display='none'" class="close" title="Close Modal">&times;</span>
  97.      
  98.     </div>
  99.  
  100.     <div class="container">
  101.       <label><b>Username</b></label>
  102.       <input type="text" placeholder="Enter Username" name="uname" required>
  103.  
  104.       <label><b>Password</b></label>
  105.       <input type="password" placeholder="Enter Password" name="psw" required>
  106.        
  107.       <button type="submit">Login</button>
  108.       <input type="checkbox" checked="checked"> Remember me
  109.     </div>
  110.  
  111.     <div class="container" style="background-color:#f1f1f1">
  112.       <button type="button" onclick="document.getElementById('id01').style.display='none'" class="cancelbtn">Cancel</button>
  113.       <span class="psw">Forgot <a href="#">password?</a></span>
  114.     </div>
  115.   </form>
  116. </div>
  117.    
  118.     </body>
  119.  
  120.     </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement