What do you want to save?
Add Code snippet
New code examples
-
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-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-09 21:48:15
how to show login user name in php
<li class='active' style='float:right;'> <?php session_start(); if($_SESSION['logged']==true){ echo $_SESSION["username"]; echo '<a href="logout.php"><span>Logout</span></a><... Add solution