use session create member log in wih mysql–continue


Sandy | Full stack Web developer

then you should create your logout.php

here is the code:

<?php
  session_start();
 
  // store to test if they *were* logged in
  $old_user = $_SESSION[‘valid_user’];  
  unset($_SESSION[‘valid_user’]);
  session_destroy();
?>
<html>
<body>
<h1>Log out</h1>
<?php
  if (!empty($old_user))
  {
    echo ‘Logged out.<br />’;
  }
  else
  {
    // if they weren’t logged in but came to this page somehow
    echo ‘You were not logged in, and so have not been logged out.<br />’;
  }
?>
<a href=”authmain.php”>Back to main page</a>
</body>
</html>

View original post

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s