1

I have a login system that store the cookie in the master domain and I want to read it from a subdomain. I don't know how to read it from the master domain. Here's what my situation looks like. The cookie is on the master domain. I don't care if it's in PHP or JavaScript, either'll work.

  • 2
    Possible duplicate of [Share cookie between subdomain and domain](https://stackoverflow.com/questions/18492576/share-cookie-between-subdomain-and-domain) – tshimkus Mar 10 '19 at 01:13

1 Answers1

0

Nevermind, after playgrounding-around, I got it to work by this. Apparently works even from the master domain.

<?php echo $_COOKIE['username'] ?>