Hi all...
I'm on site this week and working on a project that the server has
Global Variables turned off(I know I know, I SHOULD be doing that by
default..!)

Anyhoo, When I needed something dynamic, I simply did:
if (isset($_SESSION["userId"])) {
  $showMessage = "welcome";
}

However on this server, I was getting error messages stating that the
variable was not set.

If I added a blank variable at the top of the code ' $showMessage = "";  '
that 'fixed' the big.
However, now I have a list of about 30 variables at the top of my code
and it looks untidy.
There must be a better way to say to the server:
if I asign a value to a variable, presume it exists.

This only occurs when the main page requests a variable (eg
$showMessage ) and it's not ben asigned..
on other servers, it has just simply shown nothing, cause nothing was found...

Am I being a tool?

Tris...



-- 
"The only people who don't make mistakes are those who don't do anything"

Give a man a fish and he'll feed himself for a day.
Give a man a religion and he'll starve to death praying for a fish.
Anon

`We are what we pretend to be, so we must be careful what we pretend to be.`
Kurt Vonnegut

`When a person can no longer laugh at himself, it is time for others
to laugh at him.`
Thomas Szasz

____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
       Send Your Posts To: [email protected]
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.

Reply via email to