set Cookie php/javascript for subdomains

1 answer

I am making a website where we are going to sell t-shirts. All I want to do is to be able to choose a size and color and then ad to cart. The options are going to be tags, so i want to store three values in a cookie/cookies (What shirt, what size and what color). I want to be able to access the cookie from other sites. At the checkout i just want the customer to fill in a form with name and adress and all that and all the information (the order) will be sent to our email. I don't want to involve any payment method, it will be handled another way. I have no knowledge/ experience in php and nearly none in javascript, but i as long as you describe it well, I will understand. I appreciate all help I can get :)

All answers to this question, which has the identifier 33211662

The best answer:

You can't get cookies from other web-sites on different domains.

To add cookies you have to do

document.cookie = 'userName=User; shirtSize=xl;'  

and so on

Last questions

how do i remove the switch on my home screen?
how to edit the JS date and time to update atuomatically?
How to utilize data stored in a multidimensional array
Powermockito not mocking URL constructor in URI.toURL() method
Android Bluetooth LE Scanner only scans when phone's Location is turned on in some devices
docker wordpress container can't connect to mysql container
How can I declare a number in java that is more than 64-bits? [duplicate]
Optaplanner solutionClass entityCollectionProperty should never return null error when simple JSON object passed to controller
Anylogic, get the time a pedestrain is in a queue
How do I fix this syntax issue with my .flex file?
Optimizing query in PHP
How to find the highest number of a column and print two columns of that row in R?
Ideas on “Error: Type com.google.firebase.iid.zzav is referenced as an interface from com.google.firebase.messaging.zzd”?
JCIFS SmbFile.exists() and SmbFile.isDirectory() return false when it exists and I can listFiles()
PHP total order
Laravel booking system design
neural net - undefined column selected
How to indicate y axis does not start from 0 in ggplot?
Fragments in backStack
Spinner how to change the data