What do you want to save?
Add Code snippet
New code examples
-
PHP 2022-01-23 08:00:34
codeboxx php dislike like
<?php // (A) USER SESSION - FIXED USER ID TO 1 FOR THIS DEMO session_start(); $_SESSION['user'] = 1; // (B) DUMMY POSTS $posts = [ "900" => "Foo Bar", "901" => "Boo Bar", "902" => "... Add solution -
PHP 2022-01-22 13:21:23
session start php
session_start(); if(!isset($_SESSION["started"]){ //Check if the session already exist //If it does not exist we append attributes we need in $_SESSION["started"] = true; $_SESSION["attribute_1"] = $value_1; ... ... Add solution -
PHP 2022-01-22 08:35:39
refresh session php
this is a session timeout i use. when the session is initially created: session_start(); $_SESSION['LAST_ACTIVITY'] = time(); the function that gets called in other pages to update the session timeout when navigating to new pages function check_timeout... Add solution -
PHP 2021-11-20 13:56:16
create multiple session in php
//THIS WILL ALSO HELP YOU TO RUN SYNCHRONOUS CURL IN PHP session_name('s1'); session_start(); $_SESSION['name'] = 'Mai'; session_write_close(); session_name('s2'); session_start(); $_SESSION['name'] = 'Darren'; session_write_close(); Add solution -
PHP 2021-11-20 07:35:19
undefined variable _session
<?php // add session start in your first main home page after login page // example // page1 : login.php session_start(); $_SESSION['name']='(your data modifiable)'; .... //redirect to your main page after login // page2 : home-user.php session_start(... Add solution -
PHP 2021-11-17 01:29:19
SYNCHRONOUS CURL IN PHP
//usually when you run a curl in php, //your session will be affected and will not respond //this will happen if your curl request will take too long to respond. url: index.php?session=name <?php set_time_limit(0); $start_time = microtime(true); s... Add solution -
PHP 2021-11-14 06:27:08
login with facebook php
/login.php session_start(); $fb = new Facebook\Facebook([ 'app_id' => '{app-id}', // Replace {app-id} with your app id 'app_secret' => '{app-secret}', 'default_graph_version' => 'v3.2', ]); $helper = $fb->getRedirectLoginHelper(); ... Add solution -
PHP 2021-11-13 22:25:13
php $_session err_miss_cache
<?php /* establecer el limitador de caché a 'private' */ session_cache_limiter('private'); $cache_limiter = session_cache_limiter(); /* establecer la caducidad de la&... Add solution