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?

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);

: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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.