Passing JavaScript Variable to PHP Session variable

前端 未结 5 472
梦谈多话
梦谈多话 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:19

    The only alternative I can think of is using javascript to set a parameter in the URL which you could interpret later with PHP, but that would be after another page load.

    http://www.mine.com/index.html?paramter=variable&anotherparam=anothervariable
    

    see this post for a method to achive this

    edit: I don't think this will achive what you after on second thought, but I'll leave the answer just in-case

提交回复
热议问题