We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12043
    • 10 Posts
    I need to get the contents of a cookie, then output it as just text. Basically, I'm trying to use a cookie to take a javascript variable on one page and pass it to a getResources snippet call on another page by nesting two snippets. The cookie holds the resource id. Both the snippet and how it's used are below. Can this even be done this way?

    Snippert
    <?php
    return $_COOKIE["mobilepage"];


    [[getResources? &includeContent=`1` &resources=`[[mobileCookie]]` &tpl=`content`]]




    Thanks!!! [ed. note: hephaestoskin last edited this post 15 years, 1 month ago.]
      • 33968
      • 863 Posts
      Why don't you use $_POST or $_GET instead?

      Also, getResources and mobileCookie will need to be uncached or it will only work the first time wink
        • 12043
        • 10 Posts
        Um, I have no clue what I'm doing, seriously, this is all copy and paste for me at the moment. All I know is basic programming structure and principal.
          • 4172
          • 5,888 Posts
          Quote from: hephaestoskin at Aug 30, 2011, 11:09 AM
          Um, I have no clue what I'm doing, seriously, this is all copy and paste for me at the moment. All I know is basic programming structure and principal.

          well, then let us know, what's your goal with this code?
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!