Guest User

Untitled

a guest
Mar 1st, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. 42. <!DOCTYPE html>
  2. 43.
  3. 44. <html>
  4. 45. <head>
  5. 46. <title>Log In</title>
  6. 47. </head>
  7. 48. <body>
  8. 49. <form action="<?= $_SERVER["PHP_SELF"] ?>" method="post">
  9. 50. <table>
  10. 51. <tr>
  11. 52. <td>Username:</td>
  12. 53. <td>
  13. 54. <? if (isset($_POST["user"])): ?>
  14. 55. <input name="user" type="text" value="<?= htmlspecialchars($_POST["user"]) ?>">
  15. 56. <? elseif (isset($_COOKIE["user"])): ?>
  16. 57. <input name="user" type="text" value="<?= htmlspecialchars($_COOKIE["user"]) ?>">
  17. 58. <? else: ?>
  18. 59. <input name="user" type="text" value="">
  19. 60. <? endif ?>
  20. 61. </tr>
  21. 62. <tr>
  22. 63. <td>Password:</td>
  23. 64. <td><input name="pass" type="password"></td>
  24. 65. </tr>
  25. 66. <tr>
  26. 67. <td></td>
  27. 68. <td><input type="submit" value="Log In"></td>
  28. 69. </tr>
  29. 70. </table>
  30. 71. </form>
  31. 72. </body>
Add Comment
Please, Sign In to add comment