I have a select option and put disabled="disabled"
so that it cannot be selected, but when I try to press the update button it always give me this error.
error Notice: Undefined index: Province in D:\wamp\www\LTID\Updaterlbet.php on line 35
But when i try to remove the disabled="disabled"
it update successfully. But, i want that disabled to be put there so it cannot be selected..
The code
$Province = isset($_GET['fruit']) ? $_GET['fruit'] : '';
if(isset($_POST['update'])){
$ID = $_GET['ID'];
$fruit = $_POST['fruit'];
}
HTML
<select name="Province" class="form-control" id="category" onchange="javascript: dynamicdropdown(this.options[this.selectedIndex].value);">
<option selected="selected" value="<?php echo $fruut; ?>" disabled="disabled"><?php echo $fruit; ?></option>
<option value="strawberry">strawberry</option>
<option value="raspberry">raspberry</option>
<option value="blueberry">blueberry</option>
</select>