bluedookies Posted October 19, 2008 Share Posted October 19, 2008 I have been struggling with something all weekend. I thought it was the contrib I started using but literally I can have the following code in one source file: tep_session_register('customer_is_guest'); if (!tep_session_is_registered('customer_is_guest')){ echo 'FOOBAR' . !tep_session_is_registered('customer_is_guest'); } It will printout 'FOOBAR1' - How is that possible? Anyone with insight - it would be TREMENDOUSLY appreciated! Thank you in advance, Mike Quote Link to comment Share on other sites More sharing options...
germ Posted October 19, 2008 Share Posted October 19, 2008 I tried the same code and it works. :huh: Change this line: tep_session_register('customer_is_guest'); To: if ( !tep_session_register('customer_is_guest') ) { echo '<br>Failed to register variable!<br>'; } That includes a check to let you know if the register was successful or not. The code you have just assumes it was successful. :blush: Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Jan Zonjee Posted October 19, 2008 Share Posted October 19, 2008 tep_session_register('customer_is_guest'); Did you set the variable $customer_is_guest ? Otherwise just use the superglobal $_SESSION['customer_is_guest']. Works fine too. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.