Guest User

Untitled

a guest
Mar 13th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. <form method="post">
  2. <input type="text" id="username" placeholder="username" /><br>
  3. <input type="password" id="password" placeholder="password" /><br>
  4. <input type="button" id="btn" value="Login" />
  5. </form>
  6. <div id="feed_back"></div>
  7. <script src="https://code.jquery.com/jquery-3.2.1.js"></script>
  8. <script type="text/javascript">
  9.  
  10. $(document).ready(function(){
  11. $('#btn').click(function(){
  12. var username = $('#username').val();
  13. var password = $('#password').val();
  14. $.ajax({
  15. type: 'POST',
  16. url: 'alma.php',
  17. data: {username:username, password:password},
  18. statusCode:{
  19. 404: function() {
  20. $('#feed_back').html('A file not found');
  21. },
  22. 000: function() {
  23. $('#feed_back').html('a file not found');
  24. }
  25. },
  26. succes: function(data){
  27. $('#feed_back').html(data);
  28. }
  29. });
  30. });
  31. });
  32.  
  33. </script>`
  34. </body>`
  35.  
  36. <?php
  37.  
  38. $username = $_POST['username'];
  39. $username = $_POST['password'];
  40.  
  41. $username = strrev($username);
  42. echo $username.' '.$password;
  43. ?>
Add Comment
Please, Sign In to add comment