Click here to Skip to main content
15,919,358 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<%
String user=request.getParameter("user");
String pass=request.getParameter("pass");
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance();
Connection con=DriverManager.getConnection("jdbc:sqlserver://localhost\LAMOTH-PC\LAMOTH:65271;databaseName=Rainbow_Entertainment","sa","chiller7");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select * from users where UserName='"+user+"' and Password='"+pass+"'");
int count=0;
while(rs.next())
{

count++;
}

if(count>0)
{
response.sendRedirect("User page.jsp");
}
else
{
response.sendRedirect("home page.jsp");
}
%>
Posted
Comments
jhez25 8-Mar-13 22:34pm    
try this..


Private Sub log_in( )

if text1.text=("nathan") and text2.text=("cute") then
form2.show
me.hide
else
msgbox "sorry try to review ur username and password
End sub

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900