
please send me the code

Hi Friend,
Try the following code:
1)form.html:
<html> <form method="post" action="http://localhost:8080/examples/jsp/insert.jsp"> <table> <tr><td>Name:</td><td><input type="text" name="name"></td></tr> <tr><td>Address:</td><td><input type="text" name="address"></td></tr> <tr><td></td><td><input type="submit" value="Submit"></td></tr> </table> </form> </html>
2)insert.jsp:
<%@page import="java.sql.*"%>
<%
String name=request.getParameter("name");
String address=request.getParameter("address");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:student");
Statement st=con.createStatement();
int i=st.executeUpdate("insert into user(name,address) values('"+name+"','"+address+"')");
out.println("Data is inserted successfully");
%>
Thanks

('"+name+"','"+address+"')"); here i m getting problem... it shows error... that 'operator + can not be applied to java.lang.String,name can not find symbol.... plzz help me...

the insert.jsp code is not working... Becoz of there is no try catch block.... <%@page import="java.sql.*"%> is not enough.. it shud be
<%@ page language="java" import="java.sql.,java.util.,java.text.*" %>
--Rohit Soni
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.