Login Query
how to login with usertype in jsp page and redirect then whith user tyep
here is my code
<%
Connection con=null;
Statement stmt=null;
ResultSet rst=null;
String email=request.getParameter("username");
String password=request.getParameter("password");
String user=request.getParameter("usertype");
try
{
Class.forName("com.mysql.jdbc.Driver");
}
catch(Exception e)
{
out.print("driver error");
}
try
{
Class.forName("com.mysql.jdbc.Driver");
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/internship","root","");
stmt=con.createStatement();
String str="Select * from login where email='"+email+"' and password='"+password+"' and user='"+user+"'";
rst=stmt.executeQuery(str);
if(rst.next())
{
if(email.equals(rst.getString(2)) && password.equals(rst.getString(3)) && user.equals(rst.getString(4)))
{
response.sendRedirect("/student");
}
else if(user.equals(rst.getString(4)))
{
response.sendRedirect("/employer");
}
}
else
{
session.setAttribute("error","login");
response.sendRedirect("index.jsp");
}
}
catch(SQLException se)
{
out.print("driver error"+se);
}
%>
please help me
i want to redirect page with its login
View Answers
Ads
Related Tutorials/Questions & Answers:
Login Query
Login Query how to
login with usertype in jsp page and redirect...="Select * from
login where email='"+email+"' and password='"+password+"' and user...");
}
}
else
{
session.setAttribute("error","
login
login
login How to create
login page in jsp
Advertisements
login
login How to create
login page in jsp
login
login
login page display an error showing failure to
login even when the correct information is entered
login
login how to
login admin and user with the same fields(name & password) in single
login page while the table for admin and user is seprate in database(mysql)
please provide me solution
login
java.awt.event.*;
class
Login
{
JButton SUBMIT;
JLabel label1,label2;
final JTextField text1,text2;
Login()
{
final JFrame f=new JFrame("
Login Form...();
ResultSet rs=st.executeQuery("select * from
login where username='"+value1
login
login how to create
login page in jsp
Here is a jsp code that creates the
login page and check whether the user is valid or not.
1...;tr><td></td><td><input type="submit" value="
Login">
login
login i am doing the project by using netbeens.. it is easy to use the java swing for design i can drag and drop the buttons and labels etc.. now i want the code for
login.. i created design it contains the field of user name
login
login i am doing the project by using netbeens.. it is easy to use the java swing for design i can drag and drop the buttons and labels etc.. now i want the code for
login.. i created design it contains the field of user name
login
login i am doing the project by using netbeens.. it is easy to use the java swing for design i can drag and drop the buttons and labels etc.. now i want the code for
login.. i created design it contains the field of user name
login
login i am doing the project by using netbeens.. it is easy to use the java swing for design i can drag and drop the buttons and labels etc.. now i want the code for
login.. i created design it contains the field of user name
Login page
Login page how to create
Login page in java
login page
login page How to
login as different user in php
login-logout
login-logout how to do
login and logout using session in php
LOGIN ERROR
LOGIN ERROR ERROR SCRIPT:
LOGIN FAILED", $_SESSION['
login fail']='0',}?>
Ty Team
login page
");
stmt=con.createStatement();
String
query="select * from
login...
login page hi i'm trying to create
login page using jsp. i get...
<h1>
Login Example!</h1>
USER NAME <input name="uname
Login authentication
Login authentication i want d code for
login authentication from mysql database on the same pc using swings
Login authentication
Login authentication i want d code for
login authentication from mysql database on the same pc using swings
Login Page
Login Page Can anyone tell me the steps to create a
login page in myeclipse 7.0 and validating it with
login database in db2 9.7 ???
Please tell me
HQL query
HQL query how to select only password based on username using HQL
query from
login table where uname and paswrd are two column names
LOGIN PAGE
LOGIN PAGE A java program with "
login" as title,menus added, and a text field asking for firstname, lastname, and displaying current date and time
login application
login application how to create
login application ?
Hi,
Please check the following tutorials:
Video tutorial - JSP
Login Logout Example
Login Authentication using Bean and Servlet In JSP
simple code to
login user
Login modification
Login modification How can I invalidate a user once he goes back to
login page without signing out,I have already tried using session but it doesn't work please help
login box
login box class file for password and conform password and how it connected to database
login data
login data Hiiii Sir
I am doing banking project on Asp.net
i have... the data after
login i want to show particular data for particular user
means if i
login i wanna see only myn data how shud i do
thanxx in advance
login data
login data Hiiii Sir I am doing banking project on Asp.net i have... the data after
login i want to show particular data for particular user means if i
login i wanna see only myn data how shud i do thanxx in advance
login example
login example 1.Loginpage.jsp
<%@ page language="java...-Type"
content="text/html; charset=windows-1256">
<title>
Login...;
public static UserBean
login(UserBean bean) {
//preparing
login example
login example 1.Loginpage.jsp
<%@ page language="java...-Type"
content="text/html; charset=windows-1256">
<title>
Login...;
public static UserBean
login(UserBean bean) {
//preparing