I have a form that contains 2 , the first select auto-populates itself upon page load, while the second select populates itself based on the choice se
encodeURIComponent to encode the string being passed.
The value should be encoded but when you query your db it might look for exact match, in case you fail to see any output via the encoded string use decodeURIComponent to decode the string before passing it to db. Check the output at phymyadmin before your formally put the code.