%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
Untitled Document
<%
Connection con;
ResultSet rs;
Statement st;
String sponspror=request.getParameter("sponspro");
out.println(sponspror);
String sponspro;
String username="";
String name=username;
username =(String) session.getAttribute("name1");
try
{
Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql://localhost/iitDB","root","91don699629");
st=con.createStatement();
rs=st.executeQuery("select username,sponspro from adminfac where username='"+username+"' ");
if(rs.next())
{
sponspro = rs.getString("sponspro");
if(!sponspror.equals(sponspro))
st.executeUpdate("update adminfac set sponspro='"+sponspror+"' where username='"+username+"' ");
}
response.sendRedirect("lview.jsp");
}
catch(SQLException sqle)
{
System.err.println(sqle.getMessage());
}
catch (ClassNotFoundException cnfe){
System.err.println(cnfe.getMessage());
}
catch (Exception e){
out.println(e.getMessage());
out.println("sql Exexption");
}
%>
VSb2Qt-tBj8THaYW660v1nyaAEx4x3IY9un5qr5Xp2Y=.html