note 53982 deleted from ref.session by nlopess
| From: | nlopess@php.net | Date: | Mon, 20 Jun 2005 09:56:55 +0000 |
| Subject: | note 53982 deleted from ref.session by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-90672@lists.php.net to get a copy of this message | ||
Note Submitter: razvan_bc at yahoo dot com
----
Hi! This is a simple tutorial about how session function works
GET all files from here http://3xpectmore.com/freescripts/session.zip
OR
Files:
#############
******************
index.php
******************
------------------------------
<?php
session_start();
if(isset($_SESSION))
foreach($_SESSION as $ch => $vl)
{
$savesession[$ch]=$vl;
}
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY>
<?php
if(isset($savesession))
{
foreach($savesession as $ch => $vl)
{
echo("key: ".$ch. " value:".$vl."<br>");
}
}
?>
<FORM METHOD=POST ACTION="chsession.php?url=index.php">
key<INPUT TYPE="text" NAME="key"> value<INPUT
TYPE="text" NAME="value"><BR>
<INPUT TYPE="submit" value="go">
</FORM>
</BODY>
</HTML>
------------------------------
Notes :
1.this script will show you all values of $_SESSION array.
2.from here you can set session values like
key : whitehouse value: bush (this is meaning
$_SESSION['whitehouse']='bush';)
and we will send these variables to chsession.php