PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have a form that the user fills in. I am also validating that certain fields have been inputted. If the user gets an error I want to echo the fields they already have filled out so they don't have to enter them again. I have this working on all types of input fields except for "Select Option". Here is my code.
<td><select name='req_std_rec'>
<option value=''>Select...</option>
<option value = 'Y' <?php if ($req_std_rec == 'Y'): ?>select='selectetd'<?php endif; ?>>Yes</option>
<option value = 'N' <?php if ($req_std_rec == 'N'): ?>select='selectetd'<?php endif; ?>>No</option>
</select></td>
I think I'm close but have tried several versions of this code and still the echoing is not working. Also tried this without the "value =" part but not correct either.