SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Sessions and Cookies

    Hey, I'm developing a script using frames - no comments please....

    and i basically need to be able to use sessions or cookies to store temporary data in, however due to the restraints on the session and cookie functions ie, cant initiate after output has already been sent, how can i possibly get either cookies or session variables to work? I know i could store my data in a database but then that produces lag and unnecesarily stored data, anybody found a way round this or can think of a different way to store this temporary data?

    Thanks

    MadneM

  2. #2
    SitePoint Addict battra's Avatar
    Join Date
    Oct 2004
    Location
    Asylum
    Posts
    277
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can use ob_start() to buffer the output so you can still set cookie or session even after sending output.

  3. #3
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could (possibly) try using JSpan?

    http://jpspan.sourceforge.net/wiki/doku.php

    But at the end of the day my advice is to drop the frames for usability reasons if nothing else. If it's a client's website then try explaining to them the problem current and future they'll face if they retain the frames

    If the client insists on keeping the frames, assume the client knows more about web design and usability than you do, and ask them to justify their reasoning. Maybe they're a 'know it all, know -beep-all'?

  4. #4
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol, thanks i'll look into the ob_start() function and see how i get on,

    thanks

  5. #5
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh yes your a genius! i love you, thankya so much, thats saved me hours of work

    Thanks

  6. #6
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Moved to a more appropriate forum. See Where should I post my thread? for details

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •