Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions Login.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<?php
ob_start();
include('connection.php');

if(isset($_REQUEST['submit']))
{
$email = $_REQUEST['Email'];
$password = $_REQUEST['Password'];

$query = "select * from users WHERE Email ='".$email."' and Password = '".$password."'";
$sql1= mysql_query($query);

$count = mysql_num_rows($sql1);

if($count == 1)
{
header('location:signup.php');
}
else
{

$message = "Please Enter Correct Email and Password";
}
}


?>

<!DOCTYPE html>
<html lang="en">

<head>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">

<title>PenPal</title>

<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">

<!-- Custom CSS -->
<link href="css/sb-admin.css" rel="stylesheet">

<!-- Custom Fonts -->
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

</head>

<body>

<div id="wrapper">

<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">PenPal for Life</a>
</div>
<!-- Top Menu Items -->
</nav>
</div>
<!-- /#wrapper -->

<div class = "container">
<div class="wrapper">
<form method="post" class="form-signin">
<h5> <?php
if(isset($message))
{
echo $message;
}
?></h5>
<h3 class="form-signin-heading"> Sign In here</h3>
<hr class="colorgraph"><br>

<input type="email" class="form-control" name="Email" placeholder="Email *" required="" autofocus="" />
<input type="password" class="form-control" name="Password" placeholder="Password *" required=""/>


<input type="submit" class="btn btn-lg btn-primary btn-block signin_submit" value="Sign In " name="submit" />

<a href="forgot_password.html" class="forgot_password"> Forgot password?</a>
<br>
</br>
<p> If you are a new User </P>
<a href="SignUp.html" class="forgot_password">Sign Up </a>
</form>
</div>
</div>

<!-- jQuery -->
<script src="js/jquery.js"></script>

<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>

</body>

</html>
150 changes: 150 additions & 0 deletions SignUp.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
<?php
ob_start();

include('connection.php');

session_start();
if(isset($_POST['Submit']))
{

$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$email = $_POST['email'];
$password = $_POST['password'];
$_SESSION['firstname'] = $firstname;
$_SESSION['lastname'] = $lastname;
$_SESSION['email'] = $email;
$_SESSION['password'] = $password;
header('location:SignUp2.php');
}
?>

<!DOCTYPE html>
<html lang="en">

<head>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">

<title>PenPal</title>

<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">

<!-- Custom CSS -->
<link href="css/sb-admin.css" rel="stylesheet">

<!-- Custom Fonts -->
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->

</head>

<body>

<div id="wrapper">

<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<!-- Brand and toggle get grouped for better mobile display -->

<!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
<div class="collapse navbar-collapse navbar-ex1-collapse">

</div>
<!-- /.navbar-collapse -->
</nav>

<div id="page-wrapper" >

<div class="container-fluid">

<div class="container">

</div>

</div>

<!-- Page Heading -->
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">
Forms
</h1>
<ol class="breadcrumb">

<li class="active">
<i class="fa fa-edit"></i>Sign Up
</li>

</ol>
</div>
</div>
<!-- /.row -->
<a href="Login.php" >Login</a>
<div class="row">
<div class="col-lg-6">
<form name="form" method="post">
<div class="form-group row">
<label for="lgFormGroupInput" class="col-sm-2 col-form-label col-form-label-lg">FirstName</label>
<div class="col-sm-10">
<input type="text" class="form-control form-control-lg" id="lgFormGroupInput" name="firstname" placeholder="Enter your firstname">
</div>
</div>
<div class="form-group row">
<label for="smFormGroupInput" class="col-sm-2 col-form-label col-form-label-sm">LastName</label>
<div class="col-sm-10">
<input type="text" class="form-control form-control-sm" id="smFormGroupInput" name="lastname" placeholder="Enter Your lastname">
</div>
</div>
<div class="form-group row">
<label for="lgFormGroupInput" class="col-sm-2 col-form-label col-form-label-lg">Email</label>
<div class="col-sm-10">
<input type="email" class="form-control form-control-lg" id="lgFormGroupInput" name="email" placeholder="you@example.com">
</div>
</div>
<div class="form-group row">
<label for="smFormGroupInput" class="col-sm-2 col-form-label col-form-label-sm">Password</label>
<div class="col-sm-10">
<input type="password" class="form-control form-control-sm" id="smFormGroupInput" name="password" placeholder="password contain numeric and alphabets">
</div>
</div>

<input type="submit" name="Submit" value="Submit" class="btn btn-default" />
<input type="reset" name="Reset" value="Reset" class="btn btn-default" />

</form>

</div>

</div>
<!-- /.row -->

</div>
<!-- /.container-fluid -->

</div>
<!-- /#page-wrapper -->

</div>
<!-- /#wrapper -->

<!-- jQuery -->
<script src="js/jquery.js"></script>

<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>

</body>

</html>
Loading