Results 1 to 7 of 7
  1. #1

    I need the Login and Logout Sprict Please Help Me.


    I am newer in PHP. I need the login and logout script which will also generate the message if the user is already login then it the message will display "This username is already login. Pleae try another on" if the other user will use same login name. I am so much confused and try to search it but found nothing so please help me and give me the PHP code for this. I will be very thankful to for this kind favor.


  2. #2
    Join Date
    Jun 2004
    Digital Texas
    list($user) = mysql_fetch_row(mysql_query("SELECT online FROM table WHERE userid = '$userid'"));

    if ($action == login) {
    if ($user == 1) {
    echo 'Sorry, this user is already online, please try another name';
    } else {
    echo 'You have been successfully logged in.';
    mysql_query("UPDATE table SET online = 1 WHERE userid = '$userid'");

    if ($action == 'logout') {
    echo 'You have been logged out';
    mysql_query("UPDATE table SET online = 0 WHERE userid = '$userid'");

    -- try this for starters --

  3. #3
    Dear Nyture

    Thanks a lot you replied me. Can you please make this code as login page actually I can't understand how can I empliment it on my requirement. So please make it as Login page after that I will be able to use it. Looking for your kind favor again.


  4. #4
    Join Date
    Aug 2002
    Southwest Michigan
    IMO threads like this where people are asking to have work done for them for free rather than to get help should be moved to the help wanted section

  5. #5
    I need the complete code so please help me and send me the complete code for lgoin page.

  6. #6
    Join Date
    Mar 2004

  7. #7
    Join Date
    May 2005
    Planet Earth
    hehe funny thread! Disrupting traditional file hosting.
    █ Signup Early and enjoy Unlimited space/bandwidth for your files hosting, Forever!
    █ No Ads.
    █ No Countdowns.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts