0

Any one help regarding this code...
i used <%@include file=" "%> directive code..the code is executing well...but this include code nt working i.e it is nt executing..but simple code with include working well
plz plz any one provide me the solution very soon

<%@ page import="java.sql.*" %>
<%@ page import="java.io.*" %>
<body bgcolor=568945>
<center><span style="background-color:green;font-size:45;border-style:solid;">Virtual Medical Home</h1></span></center>
<%!
String funame,query;
String fpwd;
Connection con;
Statement st;
ResultSet rs;
%>
<%
funame=request.getParameter("uname");
fpwd=request.getParameter("pwd");


try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("Jdbc:Odbc:vmh");
st=con.createStatement();
query="select * from login where uid='"+funame+"' and pwd='"+fpwd+"' ";
rs=st.executeQuery(query);


if(rs.next())
{
String role=rs.getString(3);

%>

<h1>WelCome <font face="Comic Sans MS" color=purple><%=rs.getString(1)%></font></h1>
<%
session.setAttribute("funame", funame);
session.setAttribute("role", role);
%>
<%
if(funame.equals("patient"))
{
%>
<%@include file="patientpage.html"%>
<%
}
else if(funame.equals("admin"))
{

%>
<%@include file="adminpage.html"%>
<%
}
%>

<%
}
else
{

%>
<h1><%=funame%> Invalid User</h1>
<%
}
}
catch(Exception e)
{
out.println(e);
}%>

</body>

Edited by peter_budo: Keep It Clear - Do wrap your programming code blocks within [code] ... [/code] tags

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by peter_budo
0

what the response u r getting when u r executing this page

thaks 4 ur response bro...pboblem solved..

0

manish250 and saics full sentence English is expected on this forum. That mean no use of u(you) or t(are) like you would do it in chat/sms writing. Thank you for understanding

Edited by peter_budo: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.