This post is about the login page of the student section. The student will be able to login here for online admission project to make the address change request, the study center change, and will be able to view own profile.
The Source Code is as follow given below save the code with name "login.php" in student directory :
<?php
include("../functions.php");
$username="";
$password="";
if(isset($_POST['submit']))
{
if($_POST['username']=="")
$username="Please provide username";
if($_POST['password']=="")
$password="Please provide password";
$status = studentlogin();
if($status == 1)
echo "<script type='text/javascript'>alert('Invalid Username/Password.');</script>";
//if($status == 0)
//{}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<head>
<title>Login</title>
<link rel="STYLESHEET" type="text/css" href="../styles/student_forms.css" />
<!--<script src="scripts/validation.js" type="text/javascript" ></script>-->
</head>
<body>
<?php include("header.php"); ?>
<!-- Form Code Start -->
<div id='student_forms' >
<form name="loginForm" method='post' accept-charset='UTF-8' >
<fieldset align="right" style="background-repeat:no-repeat;background-image: url(../images/student-login.png);">
</br>
<div class='required'>* Required Fields</div>
<div class="container"><span class='required'>*<span>
<label class='labels'>Username :</label></br>
<input type="text" name="username" maxlength="50">
<div class="required" align="right"><?php echo $username; ?></div>
<span class='required'>*<span>
<label class='labels'>Password :</label></br>
<input type="password" name="password" maxlength="50">
<div class="required" align="right"><?php echo $password ?></div></br>
<input type="submit" name="submit" value="Submit"/></br></br>
<div class='short_msg'><a href="forgot-password.php">Forgot Password?<a>  <a href="../">Back</a></div>
</div>
</fieldset>
</form>
</div>
<?php include("footer.php"); ?>
</body>
</html>
To get the student username or password go to localhost/phpmyadmin/ and find the student_login table get the username and password there.
The Source Code is as follow given below save the code with name "login.php" in student directory :
<?php
include("../functions.php");
$username="";
$password="";
if(isset($_POST['submit']))
{
if($_POST['username']=="")
$username="Please provide username";
if($_POST['password']=="")
$password="Please provide password";
$status = studentlogin();
if($status == 1)
echo "<script type='text/javascript'>alert('Invalid Username/Password.');</script>";
//if($status == 0)
//{}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<head>
<title>Login</title>
<link rel="STYLESHEET" type="text/css" href="../styles/student_forms.css" />
<!--<script src="scripts/validation.js" type="text/javascript" ></script>-->
</head>
<body>
<?php include("header.php"); ?>
<!-- Form Code Start -->
<div id='student_forms' >
<form name="loginForm" method='post' accept-charset='UTF-8' >
<fieldset align="right" style="background-repeat:no-repeat;background-image: url(../images/student-login.png);">
</br>
<div class='required'>* Required Fields</div>
<div class="container"><span class='required'>*<span>
<label class='labels'>Username :</label></br>
<input type="text" name="username" maxlength="50">
<div class="required" align="right"><?php echo $username; ?></div>
<span class='required'>*<span>
<label class='labels'>Password :</label></br>
<input type="password" name="password" maxlength="50">
<div class="required" align="right"><?php echo $password ?></div></br>
<input type="submit" name="submit" value="Submit"/></br></br>
<div class='short_msg'><a href="forgot-password.php">Forgot Password?<a>  <a href="../">Back</a></div>
</div>
</fieldset>
</form>
</div>
<?php include("footer.php"); ?>
</body>
</html>
To get the student username or password go to localhost/phpmyadmin/ and find the student_login table get the username and password there.
0 Comments:
Post a Comment