Advertisement
Guest User

onMouseOver

a guest
Jul 29th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.41 KB | None | 0 0
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport"
  6. content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  7. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  8. <title>Problem 2</title>
  9. <style>
  10. input{
  11. margin-top: 2%;
  12. display: inline-block;
  13. }
  14. fieldset{
  15. /*For Firefox:*/
  16. background: -moz-linear-gradient(rgba(255,254,163,0.76), rgba(215,65,136,0.76));
  17. /*For Safari:*/
  18. background: -webkit-linear-gradient(rgba(255,254,163,0.76), rgba(215,65,136,0.76));
  19. /*For Opera:*/
  20. background: -o-linear-gradient(rgba(255,254,163,0.76), rgba(215,65,136,0.76));
  21. /*Standard syntax:*/
  22. background: linear-gradient(rgba(255,254,163,0.76), rgba(215,65,136,0.76));
  23. width: 50%;
  24. }
  25. .container{
  26. width: 500px;
  27. clear: both;
  28. }
  29. .input{
  30. width: 100%;
  31. clear: both;
  32. }
  33. </style>
  34. <script type="text/javascript">
  35. function describe() {
  36. document.getElementById("name").innerHTML = "you";
  37. }
  38. </script>
  39. </head>
  40. <body>
  41. <fieldset>
  42. <h2>Login</h2>
  43. <div class="container">
  44. <form method="post">
  45. Username:
  46. <input class = "input" type="text" name="username" size="50" alt="you" id = "name" onmouseover="describe()">
  47. <br>
  48. Password:
  49. <input class = "input"type="password" name="password" size="50">
  50. <br>
  51. Confirm password:
  52. <input class = "input" type="password" name="confirmPassword" size="50">
  53. <input type="submit" id = "color" style = "background-color: red" name="submit" value="submit">
  54. </form>
  55. </div>
  56. <?php
  57. $username = "";
  58. $password = "";
  59. $confirmPass = "";
  60. if(isset($_POST['submit'])){
  61. $username = $_POST['username'];
  62. $password = $_POST['password'];
  63. $confirmPass = $_POST['confirmPassword'];
  64. if(($username == null) || ($password == null)){
  65. echo "PLEASE VALIDATE YOURSELF!";
  66. }
  67. elseif($password !== $confirmPass){
  68. echo "Please retype your password correctly!";
  69. }
  70. else{
  71. echo "Greetings " . $username . "! Your encrypted password is: " . crypt($password, CRYPT_SALT_LENGTH);
  72. }
  73. }
  74. ?>
  75. </fieldset>
  76. </body>
  77. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement