Click here to Skip to main content
Rate this: bad
good
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 Moth478
Comments
jhez25 at 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
0 OriginalGriff 959
1 Sergey Alexandrovich Kryukov 886
2 Kornfeld Eliyahu Peter 575
3 Peter Leow 558
4 ProgramFOX 345


Advertise | Privacy | Mobile
Web01 | 2.8.150302.1 | Last Updated 28 Nov 2012
Copyright © CodeProject, 1999-2015
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