0
Welcome Guest! Login
0 items Join Now

Will happily pay for a solution to this

  • Re: Will happily pay for a solution to this

    Posted 17 years 9 months ago
    • I tried Donna's solution but still have problems.
      On page 1 (within the kl_php mambot) I'm capturing the User Id and displaying it ok. I've also coded the 'write' to the new session var as described by Donna above.
      On page 2 (still within kl_php) I'm displaying that new session var - only I'm not because it's blank.
      Any ideas anyone.
      Thanks for all this by the way.
  • Re: Will happily pay for a solution to this

    Posted 17 years 9 months ago
    • To debug, print out all your Session variables on the top of every page, to see what's in there:

      echo "<pre>";
      print_r($_SESSION);
      echo "</pre>";

      In the meantime, I will run a test myself.
  • Re: Will happily pay for a solution to this

    Posted 17 years 9 months ago
    • Thanks Donna, you're a star! I'll give it a go and report back.
  • Re: Will happily pay for a solution to this

    Posted 17 years 9 months ago
  • Re: Will happily pay for a solution to this

    Posted 17 years 9 months ago
    • I just tested it and it works.

      Just use:
      session_start();

      at the top of every page that is being passed session vars.
  • Re: Will happily pay for a solution to this

    Posted 17 years 9 months ago
    • Tried that but got:

      Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent
  • Re: Will happily pay for a solution to this

    Posted 17 years 9 months ago
    • session_start() code has to be before anything is output to the browser.
  • Re: Will happily pay for a solution to this

    Posted 17 years 9 months ago
    • But surely it still has to go after the opening {kl_php} ?
      Could you post the html code so I can copy it direct. Thanks.
  • Re: Will happily pay for a solution to this

    Posted 17 years 9 months ago
    • I'm using this:
      {kl_php}
      session_start();
      echo "Session Variables:";
      print_r($_SESSION);
      {/kl_php}

      But you may be outputting text prior to the php code running. If that is the case, you would put the session_start() somewhere on the page that loads before anything is output.
  • Re: Will happily pay for a solution to this

    Posted 17 years 9 months ago
    • Thanks Donna but you've lost me now....
      Do you mean I'd have to put it inside some php script such as index.php ?
      Thanks

Time to create page: 0.058 seconds