Below is part of code !!! i am new to jsp !!! it is giving error at variable temp1... help me out
try
{
Class.forName("com.mysql.jdbc.Driver").newInstance();
String url="jdbc:mysql://localhost/ecops";
Connection con = DriverManager.getConnection(url,"root","");
java.sql.Statement stmt = con.createStatement();
ResultSet rs=stmt.executeQuery("Select max(cid) from citizen_info");
while(rs.next()){
int temp1=rs.getInt("max(cid)");
break;
}
temp1=temp1++;
stmt.executeUpdate("insert into citizen_info values("+temp1+",'"+uname+"','"+pass+"','"+addr+"',"+age+",'"+date1+"','"+gender+"','"+qualif+"','"+mob+"','"+email+"','"+proof+"')");
stmt.executeUpdate("insert into login values("+appln+",'"+uname+"','"+pass+"','"+email+"')");
out.println("You are successfully registered ");
con.close();
}
catch(Exception e)
{
out.println("Error "+e);
}