发现一个错误 - 关于通过浏览器将修改后的数据插入mysql [重复]

This question already has an answer here:

I created select option list and added some data.

    <select disabled  readonly="readonly">
    <option>Something</option>
    <option>Something</option>
    </select>

But in firefox when i inspect element and change value of option list via firebug extension i can update or insert into database that value. How do you solve this kind of problems ?

</div>

Use the option value attribute, then use AJAX to retrieve the value and send it to the server. Like this--> document.getElementById("select-me").value;

<select disabled  readonly="readonly" id="select-me">
<option value="A">Something1</option>
<option value="B">Something2</option>
</select>

SERVER SIDE:

$choice = $_POST["choice"];

switch ($choice){
    case "A":
    $option = "Something1"
    break;
    case "B":
    $option = "Something2"
    break;
    default:
      $option = "no choice selected"
    break;


}