38 Comments

  1. Kelvin says

    I have a website and in my website i have a jquery slider. And on the front page of my website i have a login form but when using your code, it’s doesn’t work if i add jquery.min.js because i had an error which says Type error addEvent is not a function but its work perfectly when i remove jquery.min.js. I can’t also remove the jquery.min.js because my slider is not going to work. So how am I going to solve this PROBLEM?

  2. Alexander says

    I can’t combine with MySQL. Please rewrite the code that can connect with MySQL. thanks in advance.

  3. farhan says

    Hi It is very good tutorial, but its work fine in my local server but when i try to use it from my web host server it saw that private.php page was not appear and saw ‘ok’ in ‘login.php’ page. Any Suggestion?

    • Gabriel C.Gabriel C. says

      I believe you didn’t setup the script correctly on your web host server. Can you share the URL to the login form?

  4. K.S.M.Rajapaksha says

    awesome, Thanks great I have done some improvements too to suite my security requirements. It works nice. Thanks you very much.

  5. mac says

    hello there your post is working great!!!…but i have a question? can we put multiple usernames and password on it….best example is i will use 5 or more users for it thnks

  6. Diego says

    Hello

    Very good page, and im using this login form with MySQL, but is not working. The validation is working but i need to refresh the page, is not going automatic to private page.
    if u can help,please.

    thanks

    -Diego

    This is code i add to config.php

    // ———- LOGIN INFO ———- //

    $db_host=”localhost”;
    $db_name=”vete”;
    $username=”root”;
    $password=””;
    $db_con=mysql_connect($db_host,$username,$password);
    $connection_string=mysql_select_db($db_name);

    // Connection
    mysql_connect($db_host,$username,$password);
    mysql_select_db($db_name);

    $result = mysql_query(“SELECT password FROM medicos WHERE usuario=’$post_username'”);
    if($row = mysql_fetch_array($result)) {
    mysql_free_result($result);
    $config_username = $post_username;
    $config_password = $row[“password”];
    echo $config_username.”/”;
    echo $config_password;
    }
    mysql_close();

    $cookie_name = ‘siteAuth’;
    // ———- ———- //

  7. John Smith says

    Hi,

    I tried using downloading this and using this for my site. I seem to have a problem, because I can get the login page to work and the swivel image to work. However, one second after I try to login, the swivel stops and the page does not redirect to anything. Help please?

  8. nj says

    Webmaster,

    You are right. And I did not mean to under estimate you or your skillz in anyway! Thanks so much for your response and for this tutorial! You rock!!

    Best regards!!

    • GabrielGabriel says

      :) Don’t you think I’ve checked this over and over again? When you access the private page you will be redirected to the login page. Perhaps you’ve tested in the same browser session (while you were still logged in). I also suggest you to try on different browsers. Anyways, this tutorial is meant to give an idea to others of how they can use AJAX to create a login form.

    • GabrielGabriel says

      It does work completely. You can access the ‘private’ page because you have marked the “Remember Me” checkbox. Otherwise you can’t access private.php without being logged in.

    • GabrielGabriel says

      I’ve just tested the Ajax Login in FireFox and it works fine. Perhaps you are using an older version of FireFox (under 2).

  9. Prasad says

    I'm develop resource Allocation system and I want to hide content in main page when ajax loaded. How can I do this ?

    When I enter new page from my private page and when i back I want to log my private page . How can I do this ?

    Sometimes I refresh my site it miss my loging details . How can I solve
    This problem ?
    Thank You

  10. says

    thanks you for the reply :) the files are okie i extract them they did work but sorry if i am bothering you can u give me some advice where to find a on click popup as ajax multibox or somthing like it to put the login form in it ?

  11. GabrielGabriel says

    Yes, this form can be integrated in a popup window without any problems (if you know what you're doing, of course). You can just copy & paste the source from the current page if you're still having problems with the downloaded ZIP archive.

  12. says

    well i did download it and it not open 2 !! there was an error with the zip file and i wanna ask one other question could this login form comes in popup ? i mean when u click on a button it open a inside window or popup and shows the login form to login?

  13. GabrielGabriel says

    I've just downloaded the ZIP file and unzipped it successfully. I've used WinZip 12.0 to make the archive. You are not the first that is telling me the archive is not valid. I've tried so many ways to ZIP the tutorials’ files and all seem to be useless because they can't be open by anyone :( Please try to unzip it with WinZip 12.0. If you can't, let me know and I'll send you the files somehow.

  14. Matthias says

    Hi! The ajax-login-form.zip is faulty, it can't be unzipped. Could you mail me a working zip? Thank's, Yours, Matthias

Trackbacks

Leave a Reply

Your email address will not be published. Required fields are marked *