joem/simple-session

Manage session information with a simple interface

v1.0.0 2021-06-18 19:10 UTC

This package is auto-updated.

Last update: 2021-11-18 20:22:47 UTC


README

I find array accessing in HTML ugly. This package was created through the pain of handling sessions in WordPress templates.

Usage

session_start();

require_once "vendor/autoload.php";

session_has('username'); // false

session_set('username', 'joe');

session_has('username'); // true

session_get('username'); // 'joe'

Alternatively, you can directly access the static class methods:

Coming soon

  • Flash session messages