Jump to content
  • Advertisement
Sign in to follow this  
Brainx7

How do yo retain a selection from a drop down list when refreshing in php

This topic is 1479 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

and I don't mean like on submit with a submit function or button, I mean by just going to the refresh button of the browser and refreshing the website, I want the selection I made to show, if you could please show me a simple example that would be great

Share this post


Link to post
Share on other sites
Advertisement

It's like the other thread you opened about the checkboxes. You need JavaScript, store the "select" value in localStorage or sessionStorage when the selection changes, and (also with JavaScript), on the document ready event read the localStorage/sessionStorage and set the <option> tag to selected based on the value that was stored.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!