Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php check if session is running

<?php
if(session_status() == PHP_SESSION_ACTIVE){
    //a session is already running
    session_destroy(); //stops the session
}
?>
Comment

check if session is started

if (session_status() === PHP_SESSION_NONE) {
    session_start();
}
Comment

PREVIOUS NEXT
Code Example
Php :: php check if query succeeded 
Php :: how to calculate percentage profile completion in laravel 
Php :: join array of strings php 
Php :: php code for video upload 
Php :: laravel destroy or delete 
Php :: file form validation codeigniter 
Php :: mysqli_connect php 
Php :: how to named route resource laravel 
Php :: laravel 9 Route::controller 
Php :: Malformed UTF-8 characters, possibly incorrectly encoded 
Php :: Group by not working - Laravel 
Php :: laravel continue 
Php :: get only the first two word from a string php 
Php :: time function in php 
Php :: filter child table data from parent laravel eloquent 
Php :: Remove All Spaces Out of a String in PHP 
Php :: carbon check if date is greater 
Php :: Laravel Eloquent Query Using WHERE with OR AND OR? 
Php :: PHP Display Posts by Category in WordPress 
Php :: wordpress disable block styles 
Php :: get server ip php 
Php :: how to redirect to another page after login in laravel 
Php :: php logout 
Php :: create child theme in wordpress 
Php :: wherein elequent 
Php :: laravel logger 
Php :: php string interpolation 
Php :: change the method name in resource in laravel 
Php :: contact form 7 checkbox2 
Php :: php get first day of month 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =