Advertisement
Guest User

login.js

a guest
Sep 11th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. function check_login()
  2. {
  3. var username = $('#userid').val();
  4. var password = $('#password').val();
  5.  
  6. var url_login = 'phpfiles/cek.php';
  7. var url_admin = location.protocol+'/';
  8.  
  9. $.ajax({
  10. url : url_login,
  11. data : 'userid='+username+'&password='+password,
  12. type : 'POST',
  13. dataType: 'html',
  14. success : function(pesan){
  15. if(pesan=='ok'){
  16. window.location = url_admin;
  17. }
  18. else{
  19. alert("Login Gagal !!);
  20. }
  21. },
  22. });
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement