Click here to Skip to main content
13,191,642 members (71,382 online)
Rate this:
 
Please Sign up or sign in to vote.
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 27-Nov-12 23:01pm
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 |
Web04 | 2.8.171017.2 | Last Updated 28 Nov 2012
Copyright © CodeProject, 1999-2017
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