Saving dropdown menu selection in a cookie?

后端 未结 3 1730
轻奢々
轻奢々 2020-12-31 11:26

I\'ve seen this posted a few times, but I wasn\'t able to get the code working at all. I need help making this drop down menu save its settings to a cookie, so when the user

3条回答
  •  不思量自难忘°
    2020-12-31 12:02

    You should look into creating Session variables in PHP.

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

    You can save variables to a session and when you load the page, you check the value of the variable you set, depending on it's value, the dropdown could behave a certain way. Maybe store the name of the dropdown item as a session variable?

提交回复
热议问题