开发者

php javascript cookies

开发者 https://www.devze.com 2023-03-02 18:35 出处:网络
I am开发者_如何转开发 trying to use Cookies to send information from php to javascript. but while the coockie saved fine on $_COOKIE,

I am开发者_如何转开发 trying to use Cookies to send information from php to javascript. but while the coockie saved fine on $_COOKIE, from javascript i can only see:

PHPSESSID=e5289f50a9971fd0e1c954904056290e

any ideas about whats I'm doing wrong?


Trying to pass information from php to javascript will make things very complex if not impossible. Why don't you use PHP only for handling cookies if you have server side coding involved? And JavaScript only if you are concerned about client side only? There are plenty of tutorials available to handle cookies in JavaScript as well as in PHP. For javaScript you may refer this wikipedia writeup or visit w3resource JavaScript Cookies tutorial. For PHP visit PHP Cookies from PHP Manual or w3resource PHP cookies tutorial. Hope these help.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号