<%@page import="java.sql.*"%>
<%@page import="Dna.Sources.Dbconnection"%>
<%@ page session="true" %>
<%
String email=request.getQueryString();

Connection con=Dbconnection.getConnection();
    
  System.out.println("Database connected");
  
  Statement st=con.createStatement();
 
  
  ResultSet rs=st.executeQuery("select * from user where email='"+email+"'");
  if(rs.next()){
  int i=st.executeUpdate("update user set status='yes' where email='"+email+"'");
  if(i!=0){
  response.sendRedirect("user_details.jsp?msg=activated");
  }
    
   else{
      System.out.println("error");
   }}
    
%>