Advertisement
Guest User

Untitled

a guest
Apr 16th, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.79 KB | None | 0 0
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: nadir
  5. * Date: 10-4-2019
  6. * Time: 11:02
  7. */
  8. ?>
  9. <!DOCTYPE html>
  10. <html lang="en">
  11. <head>
  12. <link href="../css/style.css" rel="stylesheet" type="text/css">
  13. <link href="style.css" rel="stylesheet" type="text/css">
  14. <meta charset="utf-8" />
  15. <title>Opdrachten PHP periode 3</title>
  16. </head>
  17. <body>
  18.  
  19. <<?php
  20. include '../includes/header.php';
  21. ?>
  22. <div id="wrapper">
  23.  
  24. <?php
  25. $users = array(
  26. "Henk" => "1234",
  27. "Hans" => "hansanders",
  28. "ilias" => "slaafje123",
  29. "piet" => "pietanders",
  30. "hansie" => "kastie",
  31. "anjers" => "kanjers",
  32. "peter" => "rdevries",
  33. "jan" => "jan123",
  34. "CB" => "hey",
  35. "jans" => "pan",
  36. "pietje" => "bell"
  37. );
  38. $message = " foute combinatie";
  39.  
  40. $usernameInput = $_POST{"userName"};
  41. $passwordInput = $_POST{"passWord"};
  42.  
  43. $combinationFound = false;
  44.  
  45.  
  46. foreach ( $users as $index => $value)
  47. {
  48. if ($usernameInput == $index && $passwordInput == $value)
  49. {
  50. $combinationFound = true;
  51. }
  52. }
  53.  
  54.  
  55. if ($combinationFound == false)
  56. {
  57. echo $message;
  58. }
  59. ?>
  60. <h1>Bergheen</h1>
  61. <p>Welkom!</p>
  62. <form>
  63. <fieldset id="openTime">
  64. <legend>Openingstijden</legend>
  65. <Li>do:22:00</Li>
  66. <Li>vr: all day</Li>
  67. <Li>za: All day </Li>
  68. <Li>zo:12:00</Li>
  69. </fieldset>
  70. </form>
  71.  
  72.  
  73. <?php
  74. include '../includes/footer.php';
  75. ?>
  76. </body>
  77. </html>
  78.  
  79.  
  80.  
  81.  
  82. <?php
  83. /**
  84. * Created by PhpStorm.
  85. * User: nadir
  86. * Date: 10-4-2019
  87. * Time: 11:01
  88. */
  89. ?>
  90. <!DOCTYPE html>
  91. <html lang="en">
  92. <head>
  93. <link href="../css/style.css" rel="stylesheet" type="text/css">
  94. <meta charset="utf-8" />
  95. <title>Opdrachten PHP periode 3</title>
  96. </head>
  97. <body>
  98. <<?php
  99. include '../includes/header.php';
  100. ?>
  101. <div id="wrapper">
  102. <h2>Berghen </h2>
  103. <p>Login om de adresgegevens en tijden te zien</p>
  104. <p style="color: red">
  105. <?php
  106.  
  107. ?>
  108. </p>
  109. <table>
  110. <form action="script.php" method="post">
  111. <tr>
  112. <td>
  113. Username
  114. </td>
  115. <td>
  116. <input type="text" name="userName" required>
  117. </td>
  118. </tr>
  119. <tr>
  120. <td>
  121. Password:
  122. </td>
  123. <td>
  124. <input type="password" name="passWord" required>
  125. </td>
  126. </tr>
  127. <tr>
  128. <td>
  129. <input type="submit" name="btnSubmit">
  130. </td>
  131. </tr>
  132. </form>
  133. </table>
  134.  
  135. <?php
  136. include '../includes/footer.php';
  137. ?>
  138. </body>
  139. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement