Passing JavaScript Variable to PHP Session variable

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

    PHP session variable resides on the server:

    http://www.w3schools.com/PHP/php_sessions.asp

    but the JavaScript values are on client-end only.

    There should be a mechanism to send this to server, if not using ajax: try saving this value into a hidden field and then sending it using usual get/post.

提交回复
热议问题