Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function() {
- $('#lognavbtn').click(function() {
- var login = $('#login').val();
- var haslo = $('#haslo').val();
- var datastring = 'login='+login+'&haslo='+haslo;
- if($.trim(username).length>0 && $.trim(password).length>0)
- {
- $.ajax({
- type: "POST",
- url: 'https://MOJA-DOMENA.pl/libs/php/hndlrs/loginindextest.php',
- data: dataString,
- cache: false,
- beforeSend: function() {
- $('#formbox').fadeOut(500);
- },
- success: function(dane) {
- if(dane.responseText == "ok")
- {
- window.location.href = "logged.php";
- }
- else
- {
- $('#formbox').fadeIn(250);
- alert('Podano złe dane!');
- }
- },
- error: function() {
- alert('Błąd w przesyłaniu danych!');
- },
- });
- }
- else {
- alert('Proszę wpisać dane!');
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement