
i have a drop down list to select book from database. i'm able to retrieve dropdown list from database. but unable to store the selected value in database table. please help ASAP else my boss will kill me :P :D

1)select.jsp:
<html> <form method="post"> Select Programming Language: <select name="lang"> <option value="C/C++">C/C++</option> <option value="C#">C#</option> <option value="Java">Java</option> <option value="Perl">Perl</option> <option value="Python">Python</option> </select><br> <input type="submit" value="Submit"><br> </form> </html>
2)insert.jsp:
<%@page import="java.sql.*"
<%
String selectedValue=request.getParameter("lang");
out.println("Selected Value is: "+selectedValue);
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","root");
Statement st=con.createStatement();
int i=st.executeUpdate("insert into data(language) values('"+selectedValue+"')");
out.println("Data is inserted successfully");
%>

thanx for the quick response. i tried just lyk this. but it storing null value in the database. :\ what to do????