-
Notifications
You must be signed in to change notification settings - Fork 0
/
Verify-NgoButton.jsp
35 lines (33 loc) · 1.12 KB
/
Verify-NgoButton.jsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.PreparedStatement"%>
<%@page import="java.sql.DriverManager"%>
<%@page import="java.sql.Connection"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<% if((String)session.getAttribute("Name")==null)
{
response.sendRedirect("Login.jsp");
}
%>
<%
String N_ID = request.getParameter("N_ID");
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/help4u","root","vasant.1");
PreparedStatement pst=con.prepareStatement("Update ngo_details set N_Val_NonVal=1 where N_ID=?");
pst.setString(1,N_ID);
int i = pst.executeUpdate();
if(i>0)
{
response.sendRedirect("Admin.jsp");}
else
{
response.sendRedirect("admin-verifyNgo.jsp");
}
%>
</body>
</html>