Passing JavaScript Variable to PHP Session variable

前端 未结 5 522
梦谈多话
梦谈多话 2021-01-24 00:47

I am trying to update/create session variable when I change the option thru a drop-down box. TThe value is stored in a javascript function. Can any1 tell me how I can pass this

5条回答
  •  我在风中等你
    2021-01-24 01:29

    Hmmm, I think, You can do it by adding a cookie value with your javascript, and update your session in php on the NEXT PAGE REFERESH, with reference to that cookie value.

    I haven't tried it, and i don't think there is way we can update the session from just client side with javascript.

    Thanks

提交回复
热议问题