Board index   FAQ   Search  
Register  Login
Board index PHP PHP General

problem with session-hendling inside of function

General discussions related to php

Moderators: macek, egami, gesf


Postby glow » Mon Dec 16, 2002 3:53 am

maybe you'll find by this Link
useful information! :-) I'm a newbe too!*g*
New php-forum User
New php-forum User
Posts: 10
Joined: Tue Nov 26, 2002 11:00 am

Re: problem with session-hendling inside of function

Postby WiZARD » Mon Dec 16, 2002 8:58 am

mrusi wrote:Hi,
I have following problem,
with a code something like this:


if (isset($HTTP_SESSION_VARS['user'])){
echo "hi";

In this case, it works, the output is "hi" as expected.

But when I make it like this:



function f(){

if (isset($HTTP_SESSION_VARS['a'])){
echo "hi";



In this case, I get no output.Could somebody please
explain me this? I guess the HTTP_SESSION_VARS
cannot be seen inside of a function. Is there a
workaround for this?

Thanks in advance:


Hi! You so strange man! that is variable $a? you asking if $a is is? if true then show "hi".... Where is $a?
User avatar
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol

Return to PHP General

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.