Need help linking html code to mysql database
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body> <p> <font size="10">Dealer Information </font> </p> <form> Dealer name: <input type="text" name="Name" /><br /> Business Center: <input type="text" name="Business_Center" /><br /> Province: <input type="text" name="Province" /><br /> Dealer Code: <input type="text" name="Dealer_Code" /><br /> City: <input type="text" name="City" /><br /> State: <input type="text" name="State" /><br /> Level: <input type="text" name="Level" /> </form> <td><input type="submit" name="Submit" value="Submit"></td> </body> </html> <% String BusinessCenter=request.getParameter("Business_Center"); String Name=request.getParameter("Name"); String Province=request.getParameter("Province"); String DealerCode=request.getParameter("Dealer_Code"); String State=request.getParameter("State"); String City=request.getParameter("City"); String Level=request.getParameter("Level"); try{ Class.forName("com.mysql.jdbc.Driver").newInstance(); Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/Parts","root";, "admin"); Statement st=connection.createStatement(); int i=st.executeUpdate("insert into data(Businss_Center,Name, Province, Dealer_Code, State, City, Level) values('"+Name+"','"+Business_Center+"','"+Province+"','"+ Dealer_Code+"','"+State+"','"+City+"','"+Level+"')"); out.println("inserted successfully"); } catch(Exception e){} %>
Ads