I found this answer to this question https://stackoverflow.com/a/7244888/1473523, but in my situation am I not able to put a hidden field, so is there no way to do post a disabled select field in PHP?
I found this answer to this question https://stackoverflow.com/a/7244888/1473523 , but in my situation am
Share
No, that’s what disabling the field does: Prevents the value from being posted back to the server. If you’re disabling the field, you should know its value as it can’t be changed. You shouldn’t need the value to be posted back.
If the value is changing based on some other input, you should capture that input server-side and use it to calculate the value that would have been posted back, the same way you calculated which value to select client-side. Relying on the client-side calculated value to be accurate is a serious security flaw.
Your options are to somehow enable the field before the form is posted, or add a hidden field.