1. //index.html
  2. <!doctype html>
  3. <html lang="de">
  4. <head>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <script type="text/javascript">
  8. $(document).ready(function(){
  9. if($('#yd_send').stop().click(function () {
  10. var name = $('#yd_name_send').val();
  11. var pw = $('#yd_pw_send').val();
  12. if(pw == '' || name == '') {
  13. } else {
  14. $.ajax({
  15. type: 'POST',
  16. url: 'login.php',
  17. data: 'luser=' + name + '&pw=' + pw,
  18. success: function (msg) {
  19. $("#yd_warn_place").html(msg);
  20. }
  21. });
  22. }
  23. }));
  24. });
  25. </script>
  26. </head>
  27. <body>
  28. <div id="yd_start">
  29. <div id="yd_switch_case">
  30. </div>
  31. </div>
  32. </div>
  33. <footer>
  34. </footer>
  35. </body>
  36. </html>
  37. //start.html
  38. <div id="yd_login">
  39. <center>
  40. <h1 id="yd_line">Leak your Mind</h1>
  41. <form method="post">
  42. <input id="yd_name_send" type="name" placeholder="Name" required>
  43. <input id="yd_pw_send" type="password" placeholder="Passwort" required>
  44. <input type="submit" disabled="disabled" value="Login" id="yd_send">
  45. </form>
  46. <p id="yd_warn_place"></p>
  47. </center>
  48. </div>

HAbe alles noch ein bisschen zurecht geschnitten!