You are here: Re: Why Does Registered Variable Become Null? « PHP Programming Language « IT news, forums, messages
Re: Why Does Registered Variable Become Null?

Posted by kvnsmnsn on 08/09/07 19:10

On Aug 7, 3:08 pm, Rik <luiheidsgoe...@hotmail.com> wrote:

=It was answered by both me[1] & M. Stuckle[2] d.d. 2007-07-19. Have
you
=done anything with those suggestions?

Rik, what you seemed to be saying was that I should replace my
<session_is_registered()> call with an <isset()> and my <$User> vari-
able with <$_SESSION[ "User"]>, and that I could then get rid of the
<session_register()> call. That looks like a workable solution.

In my code I also have a significant number of <session_unregister()>
calls; I'm assuming I could just replace them with <unset()> calls; is
that a correct assumption?

My code has thirteen variables that it calls <session_register()> on.
Some of them are declared <global> and some are not. What does it
mean to use the <global> keyword with a session variable as opposed to
using a session variable without it, and how would I change that in my
code to just use the <$_SESSION[ 'x']> format?

Finally, when should I call <session_start()>? In particular, should
I call it at the beginning of every function that accesses a
<$_SESSION[ 'x']> variable, or is it enough to call it at the begin-
ning of each file that accesses such a variable?

---Kevin Simonson

"You'll never get to heaven, or even to LA,
if you don't believe there's a way."
from _Why Not_

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация