I have this field saved in MYSQL database.
<select id="sel1" name="grpID">
<option value="">select</option>
<option value="G00">option1</option>
<option value="G01">option2</option>
<option value="G02">option3</option>
<option value="G03">option4</option>
</select>
$grpID=$_POST['grpID'];
mysqli_query($db_Conx, "INSERT INTO users (grpID) VALUES ('$grpID')");
NOW, when I load this field, I want the saved value selected in select input box.
For example, if the saved value is "G02", I want the select input field loaded like this ![selection image][1
Is there a efficient way to do this instead of selecting it with if clauses for every and each case?
switch statement.