<select name="test1" ng-model="test11" ng-init="test11=0">
<option value="MULTIMETER" ng-value="60"></option>
</select>
When I get the value from PHP: $test = $_POST['test1'];
, it gives the value 60 (ng-value=0). I want to get the value 'MULTIMETER'
. How can I solve this problem ?
case 1 : in test11 model value is 60 when select MULTIMETER
<select name="test1" ng-model="test11" ng-init="test11=0">
<option ng-value="60">MULTIMETER</option>
</select>
case 2 : in test11 model value is MULTIMETER when select 60
<select name="test1" ng-model="test11" ng-init="test11=0">
<option ng-value="MULTIMETER">60</option>
</select>
case 3 : in test11 model value is MULTIMETER when select 60 default selected
<select name="test1" ng-model="test11" ng-init="test11=0">
<option ng-selected="true" ng-value="MULTIMETER">60</option>
</select>
case 4 : Try it
<select name="test1" ng-model="test11">
<option ng-selected="true" ng-value="MULTIMETER">MULTIMETER</option>
</select>