Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6793909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:09:29+00:00 2026-05-26T18:09:29+00:00

I have a simple website on localhost at the moment. I am working on

  • 0

I have a simple website on localhost at the moment. I am working on security. I created an additional column in the database and named it “active_notactive” of type enum(‘0’, ‘1’).

My question: How to change the active_notactive feild to 0 on the logout of that specific user.

What I want to achieve is: Before the user logs in, active_notactive=’0′ , after they login active_notactive=’1′ , when they logout=’0′. I got all of them to work apart from the logout bit.

Here is my logout script:

<?php
// start session
session_start();



// HERE IS WHERE IM STUCK
// get session email to use it in the following query
$_SESSION['email'] = $email;
// Update member to active
mysql_query("UPDATE members SET active_notactive='0' WHERE email=$email");




// delete the current dession
unset($_SESSION);
session_destroy();

// set the current cookie to 1 hour ago (to delete it)
setcookie ("online_security_user", "", time() - 3600);
setcookie ("online_security_pass", "", time() - 3600);

?>

<h2>Thank you for using our website. You are now logged out.</h2>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:09:30+00:00Added an answer on May 26, 2026 at 6:09 pm
    mysql_query("UPDATE members SET active_notactive='0' WHERE email='".$email."'");
    

    $email needs to be in quotes as it is string.

    and also above answer $email= $_SESSION["email"] needed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple website I'm testing. It's running on localhost and I can
I'm working on a relatively simple website with (currently) a single resource. I have
I have a simple website with a master-page. To set properties to elements on
I've got IIS7 installed and have a simple website at: c:/inetpub/wwwroot/testsite I can copy
I am using jQuery for a simple website and have a main page 'index.html'
We have a simple registration form for our website users where we only require
I have a question about XSLT. On a website i have a simple calendar,
I have developed a simple mechanism for my mvc website to pull in html
I have the following simple script for backing up my website files and db.
i have downloaded Swift Mailer from their website and try to send simple email

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.