<%@page import="java.sql.*" %>
<%
try
{
Class.forName("com.mysql.jdbc.Driver");
Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","root");
PreparedStatement prepare = con.prepareStatement("insert into login values(?,?)");
prepare.setString(1, "poornima");
prepare.setString(2, "java");
prepare.executeUpdate();
}
catch(Exception e)
{
}
%>
No comments:
Post a Comment