简体   繁体   中英

how to destroy session value in saving web page

I want to destroy session when my webpage is save(Ctrl+s) in local system.

session_start();

if (isset($_SESSION['id']))
    {
    $id = $_SESSION['id'];
    print_r($admin_id);
    }
  else
    {
    echo 'not avil';
    }
}

when i am saving my web page i am getting id

so, i do not want to print id, i want "not avil" when my web page and open form on local system. can any one have solution for this in PHP or java script?

Add an event listener that listens for the SHIFT and S key when pressed together, delete your data when it calls a function.

https://www.w3schools.com/jsref/met_element_addeventlistener.asp

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM