Current File : //home/obabain/autoclutchess_obaba_in/payvouchExist.jsp |
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ include file="Connection.jsp" %>
<%
try{
String loginid=(String)session.getAttribute("logid");
String uname=request.getParameter("username");
System.out.print(uname);
Statement ps = con.createStatement();
//ps.setString(1,request.getParameter("uname"));
ResultSet res = ps.executeQuery("SELECT * FROM account_voucher_main WHERE voucher_no ='"+uname+"' and voucher_type='payment' and branch_id="+loginid+"");
if(res.next()){
out.print("<span style='color:red;'>Duplicate Voucher No.</span>");
}
}catch (Exception e){
System.out.println(e);
}%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script src="http://code.jquery.com/jquery-latest.min.js"
type="text/javascript"></script>
<title>Insert title here</title>
</head>
<body>
</body>
</html>