garevn Posted August 21, 2014 Share Posted August 21, 2014 I submit this select list through a form, If the chosen number exist then I print an error but the selected value resets. Can I somehow make it remember the selected value?var myDate = new Date();var year = myDate.getFullYear();for(var i = 4; i < 16; i++){document.write('<option value="'+i+'">'+i+'</option>');}When I use Input I use this and it works fine but now I am a bit confused. <?php if (isset($_POST['name'])) echo 'value="'.$_POST['name'].'"';?> Link to comment Share on other sites More sharing options...
niche Posted August 21, 2014 Share Posted August 21, 2014 dupe Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now