I have a table in my MySQL database called studentname.
I made an array in Javascript as var array1=["john","sam","peter","kelvin"];
I populated a select box with these array values.
If the table studentname contains names like “sam” and “peter”, now I want to populate the select box with the values “john” and “kelvin” only, because “sam” and “peter” are already present in the database table.
How am I supposed to do this?
This is a three-step process: