Hi,
The above program can help you, or else you can try this code.
Code:
<% @ Page import = "java.sql .*"%>
<%
try
{
Class.Class.forName("com.mysql.jdbc.Driver");
}
catch(SQLException e)
{
System.Out.System.out.println("Can not load nn");
}
String testurl = "jdbc: mysql: / / localhost: 3306 (port) / nombasedonne";
try
{
java.sql.Connection conn = DriverManager.getConnection(testurl, user, password);
Statement stmt = conn.createStatement();
stmt.executeQuery("insert into person (name, surname) values ("+ name +","+ lastname +")");
}
catch(Exception e)
{
System.Out.System.out.println(e);
}
%>
Bookmarks