Hi people, really need help here. Here's the situation: I've got a registration page with a dropdown list of more than 300 records, and there are also other input fields as well, and the user will be returned back to the registration page if there are any missing input field (which means it wont pass the validation). What I want is to have all of the already entered values to be retained on the registration page so that the user wont have to spend too much more time filling them up again. I have no problem with this with textboxes, but as for the dropdown menu, there's a huge problem. Basically this is the best code that I think I could use so far: <option VALUE="A"<?php if($_SESSION['Variable'] =="A"){ echo "A";} ?>>A</option> Code (markup): but as you can see, there are more than 300 records, I don't wish to manually enter the variable inside, it'd be the best if there's any algorithm which works kinda like this (so I can just use them for any option: <option value="bla" <?php checkifselected(this.option.value) ?>bla bla</option> Code (markup): If anyone knows of a similar code, would you mind sharing with me?