php - Only The First Cookie Is Set While Setting Multiple Cookies -


i experiencing frustrating cookies. cookies set in php works in browsers. tried signing hosted site using google chrome android , firefox android , discovered these 2 browsers not receive cookies set in php. set 2 cookies using php chrome , firefox receives first cookie , not both. here format how set cookies:

setcookie('gfhfk', 'content1', time()+6000, '/'); setcookie('hfgfh', 'content2', time()+6000, '/'); 

but 2 browser mentioned above first cookie , ignore second one. if swap positions of set cookies in php script browsers mentioned first 1 @ top. other browsers cookies. please problem chrome , firefox android receiving first cookie , not both?

i experienced same problem in js. 1 cookie worked. see 1 solution - packing data 1 cookie or using of localstorage/sessionstorage.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -