Click here to Skip to main content
12,630,420 members (32,228 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: JSP
<%
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 28-Nov-12 0:01am
La Moth484
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161205.3 | Last Updated 28 Nov 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100