Jump to content

is setting the session like this correct?


ted_chou12

Recommended Posts

just put session_start(); at the beginning of your script. It tells php that you have a session going on (or to start one, if you don't).

[code]
<?php
  session_start();
  $_SESSION['blah'] = 'something';

  echo $_SESSION['blah']; // output: something
?>
[/code]

you need to have session_start(); on every page you wish to access your session vars

if it is still echoing out nothing, then I would check your $to and $subject to see if they are holding what you are expecting them to hold.
okay first you say it's on another page, now you say it's on another server? If you expect results, try starting with non-vague questions/descriptions.

no, you cannot pass a session from one server to another.  Well actually, you can, but I have a sneaking suspicion that that circumstance does not apply to you.  So no.

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.