
Customer Name:<select name="name">
<%
try{
Class.forName("com.mysql.jdbc.Driver");
Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/scs","root","root");
Statement st=con.createStatement();
String sql="select * from staff";
ResultSet rs=st.executeQuery(sql);
while(rs.next()){
}
%>
<option value="<%=rs.getString("fname")%>"></option>
<%
}catch(Exception e){
}
%>
</select>
can anybody tell me what is the problem in this code ??