Jump to content

Is this statement correct?


amars

Recommended Posts

yes. i want to check if it's string 'F'.

But for some reason session variables don't seem to be accessible on this page.

It's the same domain with only a minor change.

 

i started my sessions here: http://domain.com/downloads.php

this is the page i land on from above: http://domain.com/dcheck.php?file=2_fcf.xls

 

will the session be lost because of this?

Link to comment
Share on other sites

yes. i want to check if it's string 'F'.

But for some reason session variables don't seem to be accessible on this page.

It's the same domain with only a minor change.

 

i started my sessions here: http://domain.com/downloads.php

this is the page i land on from above: http://domain.com/dcheck.php?file=2_fcf.xls

 

will the session be lost because of this?

 

As long as you have session_start on each page it should exist.

Did you change it to read 'F'?

Try echoing out your session variable to see what the value actually is.

If you ever receive a blank page, try turning on error reporting by placing these 2 lines directly after your opening <?php tag:

ini_set ("display_errors", "1");
error_reporting(E_ALL);

Link to comment
Share on other sites

:shrug: My bad. I didn't put the single quotes. Thanks for pointing that out.

 

But my problem stem from a different place.  I found this posted here: http://php.net/manual/en/book.session.php

"Variations from Http://, Https:// and http://www. will throw off session data."

 

and indeed, this page was missing the www so session vars were inaccessible.

 

Thanks for all your help guys.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.