Data will not remember 1st line option

Hello, some help appreciated,

I have created a Data Base

ADD vh_16R VARCHAR( 100 ) NOT NULL ,

yet it will not remember the “Not Required” option, all other options yes, are remembered.

<td width=“16%” align=“right”><font color=“red”>Monthly Rental : </font> </td>
<td width=“16%” align=“center”>
<select name=“vh_1R6” class=“contentfont” id=“vh_1R6” style=“height: 20px; width: 170px”>
<option value=“” selected>Select</option>
<option value=“Not Required” <? echo ($item_detail[‘vh_1R6’]==‘Not Required’) ? “selected”:“”; ?>>Not Required</option>
<option value=“3000” <? echo ($item_details[‘vh_1R6’]==‘3000’) ? “selected”:“”; ?>>3000</option>
<option value=“3500” <? echo ($item_details[‘vh_1R6’]==‘3500’) ? “selected”:“”; ?>>3500</option>
<option value=“4000” <? echo ($item_details[‘vh_1R6’]==‘4000’) ? “selected”:“”; ?>>3500</option>
</select>
</td>

why?

all information appreciated :slight_smile:

you say your Data Base won’t remember an option?

you posted a block of code consisting of html and php

could we see the table please?

please do a SHOW CREATE TABLE

Looks like $item_detail[‘vh_1R6’] should be $item_details[‘vh_1R6’]

Hello r937 and DaveMaxwell,

yes DaveMaxwell very well spotted, I must have had “s” blindness, looked at that code so many times …lol

thank you to you both for your quick helpful replies :slight_smile:

Hello r937 and DaveMaxwell,

yes just tested with the “s” added, all working/remembering well,

thank you :slight_smile: