QUIZGUM

Coding Class

Quizgum : Project 1-8 : Create a logout feature

Create a logout feature.

Let's create a logout feature.
This is also very simple. Once you have the ability to log sessions to the logout page, you're done.
The sauce looks like this:

/htdocs/myProject/member/signOut.php

  1. <?php
  2. include "../include/session.php";
  3. echo 'Thank you for using This Service '.$_SESSION['ses_userid'];
  4.  
  5. unset($_SESSION['ses_userid']);
  6.  
  7. echo "<script>location.href='/myProject/';</script>";
  8. ?>

atom

php image

Logout can be done by unset the session that occurred at login.
unset(the session) The session will fly away.
I made the logout function like this. Thank you ^^ I don't know when I'll be using php.