Jump to content

verdanmahmood

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

About verdanmahmood

  • Birthday 12/31/1988

Profile Information

  • Gender
    Male
  • Location
    Pakistan

verdanmahmood's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. just double click on a php file and it will open in a software like dreamweaver (if u have one).... then simply press Ctrl+F ... and find for anything...
  2. Logged in successfull...... but the "status" is still there.... ... want the status to be updated as "login"....
  3. I have two pages.. login.php(client side page) and dologin.php(login verification page) Now the Problem is I want to UPDATE the status of a user to "login" whenever he logged in... What am i doing wrong although the LOGGED IN SUCCESSFUL message is available.... ? ? ? Here is my login.php Code... <form id="login_form" name="form" method="post" action="doLogin.php"> <br /><br /><div class="form_error"> </div> <p> <label for="email" class="content_login">Email :</label> <input type="text" id="email_login" name="email" /> </p> <p> <label for="password" class="content_login">Password :</label> <input type="password" id="password_login" name="password" /> </p> <input style="margin-right:5px; margin-left:125px" type="submit" class="content_login" value="Sign In" id="login_btn"/> <input type="reset" id="close" onclick="this.form.reset();" class="content_login" value="Cancel"/> </form> AJAX. $(document).ready(function() { $(".window #login_btn").click(function() { var action = $("#login_form").attr('action'); var form_data = { email: $("#email_login").val(), password: $("#password_login").val(), is_ajax: 1 }; $.ajax({ type: "POST", url: action, data: form_data, success: function(response) { if(response == 'success'){ $(".form_error").html("You Have Loged In... !"); $(".window").slideUp('slow') $('#mask').fadeOut(500); setTimeout("location.reload(true);",1300) } else $(".form_error").html("Invalid username and/or password."); } }); return false; }); Dologin.php code... if(isset($is_ajax) && $is_ajax) { $email = $_REQUEST['email']; $password = md5($_REQUEST['password']); $sql = mysql_query("SELECT * FROM user WHERE email='$email' and password='$password'"); $id=mysql_fetch_array($sql); $id=$id['user_id']; $count = mysql_num_rows($sql); if ($count==1){ $status=mysql_query("UPDATE user SET status='login' WHERE user_id='$id'"); echo "success"; die();} if($count!=1) echo "fail"; }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.