Can variable retain a value in PHP?

Whats In Name

Whats In Name

@whats-in-name-KdgM7o Oct 22, 2024
Can we retain a variable value in PHP after closing the application(with a new session every time),without saving it to any database or file?If yes,how?

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • Manish Goyal

    Manish Goyal

    @manish-r2Hoep Mar 21, 2013

    no it is not possible but through cookies yes you can , until some one deletes them through browser directly

    Thanks
  • Prasad Ajinkya

    Prasad Ajinkya

    @prasad-aSUfhP Mar 22, 2013

    Another option is to use the localstorage in HTML5
    <a href="https://www.w3schools.com/html/html5_webstorage.asp" target="_blank" rel="nofollow noopener noreferrer">HTML Web Storage API</a>