
in my dropdown two options are their and i want when i select any option the corresponding value that go in the database should be different. for eg. in my drop down there are two optiond like delhi and mumbai so if a person select delhi then entry in database should be 'D' and if any one select mumbai then the entry in the database should be 'M'.

Do you want autosuggest or autocomplete box?

Use the following code:
<%
String selectedvalue=request.getParameter("select");
char ch=selectedvalue.charAt(0);
String st=Character.toString(ch);
%>
The value st is then inserted into database. It stores the first character of any selected value.