Just started using PHP/MySql to convert old Access program. Using Bootstrap to speed things up. Generally it is going ok, except for using the Select input
In the data table dayofweek is stored as an integer (1=Monday etc).
I can get back that value ok, but am struggling with trying to show it as selected item in a Bootstrap Select input where the options are "Monday", "Tuesday"..."Sunday"
I assume it must be done with Javascript using the value from the database to set the index of the options, but have been struggling to see how this is done.
Similarly I need to convert the selected value back to the index to write back to the table.
I thought Google might have been my friend, but haven't found anything so far.
Can anyone give me a clue?
Thanks
In the data table dayofweek is stored as an integer (1=Monday etc).
I can get back that value ok, but am struggling with trying to show it as selected item in a Bootstrap Select input where the options are "Monday", "Tuesday"..."Sunday"
I assume it must be done with Javascript using the value from the database to set the index of the options, but have been struggling to see how this is done.
Similarly I need to convert the selected value back to the index to write back to the table.
I thought Google might have been my friend, but haven't found anything so far.
Can anyone give me a clue?
Thanks