Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 4.76 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Contact</title>
  5.  
  6. <meta charset="utf-8">
  7.     <!-- Required for responsive view when on mobile -->
  8.   <meta name="viewport" content="width=device-width, initial-scale=1">
  9.  
  10.   <!-- calling custom css links -->
  11. <link rel="stylesheet" type="text/css" href="Stylesheet1.css"/>
  12. <link rel="stylesheet" type="text/css" href="contactCSS.css"/>
  13.  
  14. <!-- Calling the Boostrap 4 stylesheet and JavaScript Library  -->
  15.   <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
  16.   <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
  17.   <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
  18.   <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
  19.  
  20. <!-- jQuery -->
  21.   <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
  22.   <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.bundle.min.js" integrity="sha384-pjaaA8dDz/5BgdFUPX6M/9SUZv4d12SUPF0axWc+VRZkx5xU3daN+lYb49+Ax+Tl" crossorigin="anonymous"></script>
  23.    
  24.  
  25.   <script>
  26.   $( function() {
  27.     $( "input" ).checkboxradio();
  28.   } );
  29.   </script>
  30.     <script>
  31.   $( function() {
  32.     $( document ).tooltip();
  33.   } );
  34.   </script>
  35.  
  36. </head>
  37. <body>
  38.  
  39. <?php
  40.  
  41. // Connecting to the database
  42.  
  43. include('dbconnect.php');
  44.  
  45. // Create SQLi query to display records from database
  46.  
  47. $query = "SELECT * FROM feedback ORDER BY user_id ASC";
  48. $result = mysqli_query($conn, $query);
  49.  
  50.  
  51. ?>
  52.  
  53. <div class="container">
  54.    <img class="logo" src="images/Tool.jpg" alt="Logo">
  55. </div>
  56.  
  57. <div class="header">
  58.   <ul class="nav justify-content-center">
  59.     <li class="nav-item">
  60.       <a class="nav-link" style="color: white" href="Home.htm">Home</a>
  61.     </li>
  62.     <li class="nav-item">
  63.       <a class="nav-link" style="color: white" href="Suppliers.htm">Suppliers</a>
  64.     </li>
  65.     <li class="nav-item">
  66.       <a class="nav-link" style="color: white" href="Products.htm">Products</a>
  67.     </li>
  68.     <li class="nav-item">
  69.       <a class="nav-link" style="color: white" href="Contact.htm">Contact us</a>
  70.     </li>
  71.     <li class="nav-item">
  72.       <a class="nav-link" style="color: white" href="FindUs.htm">Find Us</a>
  73.     </li>
  74.   </ul>
  75. </div>
  76.  
  77.  <div class="container">
  78.   <form  action="insert.php" class="contact" class="was-validated" method="post">
  79.  
  80.     <label for="fname">First Name</label>
  81.     <input type="text" id="fname" required="required" name="firstname" placeholder="Your name..">
  82.  
  83.     <label for="lname">Last Name</label>
  84.     <input type="text" id="lname" required="required" name="lastname" placeholder="Your last name..">
  85.  
  86.     <fieldset>
  87.       <label for="fname">Gender:   </label>
  88.       <label for="radio-1">Male</label>
  89.       <input type="radio" name="radio-1" id="radio-1">
  90.       <label for="radio-2">Female</label>
  91.       <input type="radio" name="radio-1" id="radio-2">
  92.     </fieldset>
  93.    
  94.     <label for="fname">Email Address</label>
  95.     <input type="text" id="fname" name="email" required="required" placeholder="Your email.."  title="Please entere a valid email address.">
  96.  
  97.     <label for="subject">Subject</label>
  98.     <textarea id="subject" name="subject" required="required" placeholder="Write something.." style="height:200px"></textarea>
  99.  
  100.     <input type="submit" value="Submit">
  101.  
  102.   </form>
  103. </div>
  104.  
  105. <div class="col-sm-8">
  106. <h3>Display All Users</h3>
  107. <table class="table table-hover">
  108. <thead>
  109.     <tr>
  110.         <th>user_id</th>
  111.         <th>Firstname</th>
  112.         <th>Surname</th>
  113.         <th>Email</th>
  114.         <th>Subject</th>
  115.     </tr>
  116. </thead>
  117.  
  118. <tbody>
  119.  
  120. <?php
  121.  
  122. while ($row = mysqli_fetch_assoc($result)){
  123.    
  124.  
  125.  
  126. ?>
  127.  
  128. <tr>
  129.     <td><?php echo $row['user_id'];?></td>
  130.     <td><?php echo $row['Firstname'];?></td>
  131.     <td><?php echo $row['Lastname'];?></td>
  132.     <td><?php echo $row['Email'];?></td>
  133.     <td><?php echo $row['Subject'];?></td>
  134.    
  135.  
  136. <td>
  137. <a href="edit2.php?id=<?php echo $row['user_id']; ?>"><button type='button' class='btn btn-info btn-xs fa fa-edit'></button></a>
  138. <a href="delete.php?id=<?php echo $row['user_id']; ?>"><button type='button' class='btn btn-danger btn-xs fa fa-trash'></button></a>
  139. </td>
  140. </tr>
  141. <?php
  142. }
  143. mysqli_close($conn);
  144.  
  145.  
  146.  
  147. ?>
  148.  
  149.  
  150.  
  151. </tbody>
  152. </table>
  153.  
  154.  
  155. </body>
  156.  
  157. <!-- Footer with bootstrap4 code for style-->
  158. <footer class="footer">
  159.  
  160.   <!-- Copyright -->
  161.   <div class="footer-copyright text-center py-3">© 2019 Copyright:
  162.     <a href="https:#"> cavc.ac.uk</a>
  163.     <p>Contact information: <a href="adrian_rowlands@msn.com">adrian_rowlands@msn.com</a></p>
  164.   </div>
  165.   <!-- Copyright -->
  166.  
  167. </footer>
  168. <!-- Footer -->
  169.  
  170. </footer>
  171. <!-- Footer -->
  172.  
  173. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement