HS Banner
Back
PHP Session

Author: Admin 07/27/2022
Language: PHP
Views: 192
Tags: session php


Description:

Here's how I setup a session for a PHP app.

Article:

Here's how I setup a session with its default values on page load.

//Setup session
if (!isset($_SESSION['$SessData']['Skip'])){
    $_SESSION['$SessData']['Skip'] = true;
    $_SESSION['$SessData']['sql'] = explode('|',$app->getSQL());
    $_SESSION['$SessData']['NewIndex'] = 0;
    $_SESSION['$SessData']['days'] = 0;
    $_SESSION['$SessData']['daysTotal'] = 0;
    $_SESSION['$SessData']['day'] = 0;
    $_SESSION['$SessData']['Status'] = 0;
    $_SESSION['$SessData']['Tried'] = '';
}


Back
Comments
Add Comment
There are no comments yet.