Connecting Tech Pros Worldwide Help | Site Map

Information Regarding $_Session and Extract

 
LinkBack Thread Tools Search this Thread
  #1  
Old August 23rd, 2007, 11:25 AM
kimi
Guest
 
Posts: n/a
Default Information Regarding $_Session and Extract

Hi ppl,

I am new to PHP. I would need some information on the following:

1. a) I wanted to know from where the data is extracted and stroed in
the global assocoative
arrays ( specifically what will be the contents of $_Session ?)
b) Is there any way by which i can get to know all the keys of the
arrays ( specifically what
are the Keys of $_Session ?)
extract($_GET);
extract($_POST);
extract($_COOKIE);
extract($_SERVER);
#extract($_SESSION);


  #2  
Old August 23rd, 2007, 11:35 AM
Erwin Moller
Guest
 
Posts: n/a
Default Re: Information Regarding $_Session and Extract

kimi wrote:
Quote:
Hi ppl,
>
I am new to PHP. I would need some information on the following:
>
1. a) I wanted to know from where the data is extracted and stroed in
the global assocoative
arrays ( specifically what will be the contents of $_Session ?)
Hi,

The content of $_SESSION is stored serialized in a file, that is stored
in the directory given in php.ini. Often some tmp directory on the machine.

Find it by using php_info().

Quote:
b) Is there any way by which i can get to know all the keys of the
arrays ( specifically what
are the Keys of $_Session ?)
extract($_GET);
extract($_POST);
extract($_COOKIE);
extract($_SERVER);
#extract($_SESSION);
>
Use print_r() for this.
Don't forget to wrap the HTML <prearound it.
So:
echo "<pre>";
print_r($_POST);
echo "</pre>";

Regards,
Erwin Moller
  #3  
Old August 23rd, 2007, 11:45 AM
Ulf Kadner
Guest
 
Posts: n/a
Default Re: Information Regarding $_Session and Extract

kimi wrote:
Quote:
I am new to PHP. I would need some information on the following:
>
1. a) I wanted to know from where the data is extracted and stroed in
the global assocoative
arrays ( specifically what will be the contents of $_Session ?)
This arrays are not only global. They are superglobal! It means you can
access it from everywhere.

See: http://www.php.net/manual/en/languag...predefined.php

It also descibes what you are asking for.
Quote:
b) Is there any way by which i can get to know all the keys of the
arrays ( specifically what
are the Keys of $_Session ?)
http://www.php.net/array_keys
Quote:
extract($_GET);
extract($_POST);
extract($_COOKIE);
extract($_SERVER);
This is VERY BAD! Its no reason to do things like this.

Ulf

--
_,
_(_p Ulf [Kado] Kadner
\<_)
^^
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.