• I am integrating wordpress with magento and magento send a cookie to wordpress to know the language is choose. Magento creates the cookie but when I try this to call the cookie nothing happen
    '
    if (isset($_COOKIE[“idioma”]))
    echo $_COOKIE[“idioma”] . “!;
    `
    any advise?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter vesvello2010

    (@vesvello2010)

    any help with this?

    Hi,

    This is the format I used for setting a cookie:

    $cookie_number = “123456789”;
    setcookie(“the_name_you_chose”, $cookie_number, time() + 3600);

    Then to test if it is set with PHP:

    $browser_cookie = $_COOKIE[‘the_name_you_chose’];

    if($browser_cookie != $cookie_number){

    or

    if($browser_cookie == $cookie_number){
    — > do you stuff here < —
    }

    This works for me..

    az

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘How cookies works in WordPress’ is closed to new replies.