Ad block is installed and active. Please support us by disabling it.
HomeSunday, November 19, 2017, 14:10:39
1

PHP $_SESSION

Monday, February 9, 15, 13:32:12, 3 Yaers Ago Via wain, Hits: 2974
Session_start creates a session or resumes the current one based on a session identifier passed via a GET or POST request, or passed via a cookie.
Example:

index.php

Code:
<?php session_start();
$numero = rand(100, 999);
$_SESSION['rand'] = $numero;
echo $_SESSION['rand'];
?>
<br><a href="session.php">session.php</a>


session.php

Code:
<?php session_start();
echo $_SESSION['rand'];
?>
<br /><a href="destroy.php">destroy.php</a>


destroy.php

Code:
<?php session_start();
echo $_SESSION['rand'];
session_destroy();
?>
<br /><a href="index.php">index.php</a>

Sign In

Sponsor

Related

Preventing multiple form submissions

Preventing multiple form submissions

Stack Overflow Clone Script - Ja2BU

Open source question and answer script written in PHP, MySQL and jQuery. Main features are: SEO friendly url's, private message system, rating system, comments system.

Creating a CAPTCHA with PHP :: PHP Tutorial

Captcha Image, This tutorial will show you how to create a form with Captcha.

Captcha V1 - Free PHP Script

An anti-spam form protection image written in PHP, Version: 1.1.

Upload Image With PHP

[Example3] Tutorial - How to upload image in php.

Random MySQL Query

Random MySQL query, requirement(s): PHP Server, MySQL

PHP Form Validation

PHP form validation :: PHP tutorial, requirement(s): PHP Server

PHP Forms

FREE PHP forms

Show / Hide Div with CSS

CSS Display and Visibility:The visibility property specifies whether or not an element is visible.

HTML Button Generator

This script will allow your visitors to create HTML Buttons online. To use the "html button generator" script completely free , the "powered by" link at the bottom of the pages must stay intact.
About Author

wain

Date Registered: Sun, Feb 8, 15
Last Time Online: Thu, Jun 15, 17
So far has created 115 entries.
wain
This author has not yet filled in any details.