We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24629
    • 370 Posts
    Hi all,

    i made a nice Quiz in Modx, custom tables and all. now for this to work i use $_SESSION['userid'].
    the whole thing plays in an iframe on another site and now the SESSION doesn't work.
    I googled and read several articles but understand none of 'm completely. some say use session_start().
    some say check the server times of both servers (they are the same server). none of which i got to work.
    Can anyone give a tip on how to solve this?

    tnx
    Rdg
      • 813 ☆ A M B ☆
      • 326 Posts
      On the MODX side, don't use session_start(). MODX will have already taken care of this. You will most likely still have to on the containing site, though.
        • 33968
        • 863 Posts
        It will be a problem if the domains are different. Perhaps try something like this:

        http://stackoverflow.com/questions/2956214/cross-domains-sessions-shared-shopping-cart-cross-domains

        If security/authentication is not important you could just pass the userid in the iframe url... [ed. note: okyanet last edited this post 14 years, 3 months ago.]