Warning: mysqli_connect() [function.mysqli-connect]: (HY000/2002): Can't connect to local server through socket '/var/lib/mysql/mysql.sock' (2) in /home/itprojectsco/public_html/includes/database.php on line 13
Ready Project |BCA Project | MCA Project | BBA Project | MBA Project |INDIA'S BIGGEST COLLEGE PROJECT STORE
Slip1_checklogin.jsp
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%
String username = request.getParameter("username");
String password = request.getParameter("password");
out.println("Checking login
");
if (username == null || password == null) {
out.print("Invalid paramters ");
}

// Here you put the check on the username and password
if (username.toLowerCase().trim().equals("admin")&&
password.toLowerCase().trim().equals("admin"))
{
out.println("Welcome " + username + " Back to main");
session.setAttribute("username", username);
}
else
{
out.println("Invalid username and password");
}
%>
Slip1.jsp
<%@page contentType="text/html" pageEncoding="UTF-8"%>



Login using jsp


LOGIN FORM


<%
String myname = (String)session.getAttribute("username");
if(myname!=null)
{
NR CLASSES, PUNE (8796064387/90)
out.println("Welcome "+myname+" , Logout");
}
else
{
%>



Username:< input name="username" size=15 type="text" />




Password : <input name="password" size=15
type="password" />

<input type="submit" value="login" />

<%
}
%>


Slip1_logout.jsp
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%
String username=(String)session.getAttribute("username");
if(username!=null)
{
out.println(username+" loged out, Back");
session.removeAttribute("username");
}
else
{
out.println("You are already not login Back");
}
%>

Search

Project Categories


    Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in /home/itprojectsco/public_html/includes/sidebar.php on line 30

    Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, null given in /home/itprojectsco/public_html/includes/sidebar.php on line 32

Recent Posts


Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in /home/itprojectsco/public_html/includes/widget.php on line 5

Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, null given in /home/itprojectsco/public_html/includes/widget.php on line 7

Sign In