• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

retrieve data from database using session

phpsessionfetch


PHP Snippet 1:

if(!empty($_SESSION['idmember'])){
    header("Location: login.php");
}

PHP Snippet 2:

if (!isset($_SESSION['idmember'])){
    header("Location: login.php");
}

Related Snippets

Target class controller does not exist - Laravel 8

html-php form submission after validation through JavaScript [closed]

Laravel Multi-language routes without prefix

ConstraintViolationListInterface to Exception in Symfony

Submitting a form with ajax in Wordpress

Adding reCAPTCHA v2 into my PHP file

Xdebug 3 not showing in phpinfo on m1 Monterey

Only on Firefox "Loading failed for the <script> with source"

How to convert the int value to inch in PHP [closed]

Laravel SQL query midnight time not showing

Show only featured products in Woocommerce shop page

How Can I Do LIMIT 1, 2 In WP_Query

Doctrine 2 mapping referencing unique key

Creating Combinations of Elements

how to redirect the user back to desired URL after login page in PHP?

About Contact Privacy policy Terms and conditions