note 53982 added to ref.session
| From: | razvan_bc at yahoo dot com | Date: | Mon, 20 Jun 2005 09:46:22 +0000 |
| Subject: | note 53982 added to ref.session | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-90666@lists.php.net to get a copy of this message | ||
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
----
Manual Page -- http://www.php.net/manual/en/ref.session.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+53982
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53982&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53982&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53982&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53982&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+53982&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53982&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+53982&report=yes
Search -- http://master.php.net/manage/user-notes.php