What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-11-04 06:00:12
php session auto expire
//Ending a php session after 30 minutes of inactivity $minutesBeforeSessionExpire=30; if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > ($minutesBeforeSessionExpire*60))) { session_unset(); // unset $_SE... Add solution -
Javascript 2021-11-02 23:58:08
session in jquery
You need to reffer this tutorial: http://phprocks.letsnurture.com/create-session-with-jquery/ Add required files and refer code - jquery-1.9.1.js and jquery.session.js ex. To set session: $(function() { $.session.set("myVar", "Hello W... Add solution -
PHP 2021-11-01 14:23:12
php expire a session
//Ending a php session after 30 minutes of inactivity $minutesBeforeSessionExpire=30; if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > ($minutesBeforeSessionExpire*60))) { session_unset(); // unset $_SE... Add solution -
Other 2021-10-29 00:25:18
login.php
<?php session_start(); $errorMsg = ""; $validUser = $_SESSION["login"] === true; if(isset($_POST["sub"])) { $validUser = $_POST["username"] == "admin" && $_POST["password"] == "... Add solution -
PHP 2021-10-28 12:06:05
php expire session
//Ending a php session after 30 minutes of inactivity $minutesBeforeSessionExpire=30; if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > ($minutesBeforeSessionExpire*60))) { session_unset(); // unset $_SE... Add solution -
PHP 2021-10-27 05:57:07
como destruir uma variavel de sessão
// criando sessões de login session_start(); $email = $_SESSION['email']; $senha = $_SESSION['senha']; // criando sessões do jogo $senha = $_SESSION['palavra']; $senha = $_SESSION['letra']; // removendo todas as sessões session_star... Add solution -
Javascript 2021-10-26 00:11:08
submitting login and sign up forms using AJAX
<?php session_start(); // check whether the loginbtn was clicked if (isset($_POST['loginbtn'])) { include_once 'dbh.inc.php'; // initialize variable $uid = trim($_POST['uid']); $pwd = trim($_POST['pwd']); // error handlers // ... Add solution