Advertisement
Guest User

Untitled

a guest
Jun 2nd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. <html>
  2. <link rel="stylesheet" href="css.css" />
  3. <body>
  4. <?
  5. include("dbinfo.inc.php");
  6. include("header.php");
  7.  
  8.  
  9.  
  10. // Define your username and password
  11.  
  12. $pwusername = "deflecht";
  13.  
  14. $pwpassword = "reuni1e";
  15.  
  16.  
  17.  
  18. if ($_POST['txtUsername'] != $pwusername || $_POST['txtPassword'] != $pwpassword) {
  19.  
  20.  
  21.  
  22. ?>
  23.  
  24.  
  25.  
  26. <h1>Login</h1>
  27.  
  28.  
  29.  
  30. <form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
  31.  
  32. <p><label for="txtUsername">Username:</label>
  33.  
  34. <br /><input type="text" title="Enter your Username" name="txtUsername" /></p>
  35.  
  36.  
  37.  
  38. <p><label for="txtpassword">Password:</label>
  39.  
  40. <br /><input type="password" title="Enter your password" name="txtPassword" /></p>
  41.  
  42.  
  43.  
  44. <p><input type="submit" name="Submit" value="Login" /></p>
  45.  
  46.  
  47.  
  48. </form>
  49.  
  50.  
  51.  
  52. <?php
  53.  
  54.  
  55.  
  56. }
  57.  
  58. else {
  59.  
  60.  
  61.  
  62. ?>
  63.  
  64. echo "<center><table class='zork'>";
  65.  
  66. mysql_connect(localhost,$username,$password);
  67. @mysql_select_db($database) or die( "Unable to select database");
  68. $result = mysql_query("SELECT * FROM lijst ORDER BY ID ASC");
  69. while($row = mysql_fetch_assoc($result)){
  70. echo "<tr><td>".$row['ID']." ".$row['voornaam']." ".$row['tussenvoegsel']." ".$row['achternaam']."</td><td>".$row['betaald']."</td></tr>";
  71. }
  72. ?>
  73.  
  74.  
  75. <form action="editbetaald.php" method="post">
  76. <p><label for="editID">ID</label> <input type="text" name="editID" /></p>
  77. <p><label for="nubetaald">Betaald?</label> <input type="text" name="nubetaald" /></p>
  78. <p class="submit"><input type="submit" value="Verzenden" /></p>
  79. </form>
  80.  
  81. <?
  82. echo "</table>";
  83. echo "</center>";
  84.  
  85. include("footer.php");
  86.  
  87. ?>
  88. </body>
  89. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement