Jump to content


Photo

Old man confused by isset


  • Please log in to reply
3 replies to this topic

#1 litebearer

litebearer
  • Members
  • PipPipPip
  • Advanced Member
  • 2,357 posts
  • Locationwhite lake michigan

Posted 06 June 2006 - 10:22 PM

I used an 'install package' to install apache/php/mysql on my system (WIN XP) at home.

I used the EXACTLY identical 'install package' to install apache/php/mysql on my system (Same verion of XP as at home - all updates and patches are identical) at the office.

I did NOT change any of the ini settings on either system so they too should be identical. (I downloaded the 'package' to my thumb drive and installed both systems from the same thumb drive).

The Problem:

when this script is run at home, it echos out [!--coloro:#FF6666--][span style=\"color:#FF6666\"][!--/coloro--]Claims to be set[!--colorc--][/span][!--/colorc--].
when I run the identical script at my office it echos out [!--coloro:#FF6666--][span style=\"color:#FF6666\"][!--/coloro--]Says not set[!--colorc--][/span][!--/colorc--]

if I put an exclamation mark in front of isset, then they reverse their ouptuts.

Why????
if (isset($_SESSION['yesitis'])) {
    echo "Claims to be set";
}else{
    echo "Says not set";
}
Thanks,

Lite...


all the brothers were valiant!

[br][br]The truely intelligent people are not those who create the dots; rather they are they ones with the ability to connect the dots into a coherent picture

#2 Caesar

Caesar
  • Members
  • PipPipPip
  • Advanced Member
  • 1,025 posts

Posted 06 June 2006 - 10:26 PM

Your first mistake, was running it on Windows. [img src=\"style_emoticons/[#EMO_DIR#]/laugh.gif\" style=\"vertical-align:middle\" emoid=\":laugh:\" border=\"0\" alt=\"laugh.gif\" /]

Sorry, J/K (Kind of :-P)...ahem. *Clears throat* You may proceed.
PHP Ninja

#3 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,021 posts

Posted 06 June 2006 - 10:41 PM

add to your script

echo '<pre>', print_r($_SESSION, true), '</pre>';

Is it set?
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts

#4 litebearer

litebearer
  • Members
  • PipPipPip
  • Advanced Member
  • 2,357 posts
  • Locationwhite lake michigan

Posted 07 June 2006 - 03:08 AM

Thank you!.

Your test lead me to see the error of my thinking. Too much wine and tight swim goggles can do that.

I was clicking thru too fast and completely missed the fact that it was in fact doing things properly, I simply was in error.

Thanks again.

Lite...

all the brothers were valiant!

[br][br]The truely intelligent people are not those who create the dots; rather they are they ones with the ability to connect the dots into a coherent picture




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users