</div> <?php //moving to basic search page for guest user if (isset($_POST['withoutid'])) { $_SESSION['withoutid'] = $_POST['withoutid']; header("Location:basicsearch.php"); } //checking for logged in user if (isset($_POST['login'])) { $username = strip_tags($_POST['username']); $password = $_POST['password']; if ($username == "" || $password == "") { echo "<br /><font color='red'><b>Provide all the required fields!</b></font>"; } else { if ($data->checkUsername($username) != null) { //echo $data->checkUsername($username); //foreach($data->getPassword($username) as $pwd) { //$strPwd = implode($pwd); $strPwd = $data->getPassword($username); //} //echo $strPwd; if (password_verify($password, $strPwd)) { $_SESSION['username'] = $username; $_SESSION['login'] = $_POST['login']; header("Location:basicsearch.php"); } else { echo "<br /><font color='red'><b>Password doesn't match!</b></font>"; } } else { echo "<br /><font color='red'><b>Username doesn't exist!</b></font>";
<div class="panel-body"> <div class="form-group" id="content"> <form method="POST" action="" name="forgotPasswordForm"> <label> Username<font color="red">*</font> <br /> <input type="email" name="email" autocomplete="off" class="form-control"></label> <input type="submit" id="continue" name="continue" value="Continue" class="btn btn-primary"> </form> <?php if (isset($_POST['continue'])) { if (strip_tags($_POST['email']) == "") { echo "<font color='red'><b>Username is required!</b></font>"; } else { if ($data->checkUsername(strip_tags($_POST['email'])) != null) { $_SESSION['username'] = strip_tags($_POST['email']); header("Location:securityQuestions.php"); } else { echo "<font color='red'><b>Username doesn't exist!</b></font>"; echo "<br /><br /><a href='homepage.php#sectionSignup'>Click here to Sign Up!</a>"; } } } ?> </div> </div> </div> </body> </html>
<!DOCTYPE html> <head> <meta charset="utf-8"> <title>User Sign Up</title> <link rel="stylesheet" href="css/style.css"> </head> <body> <form method="post" action="" name="Form"> <p>Username:<input type="email" name="email" autocomplete="off" value="" ></p> <p class="submit"><input type="submit" id="continue" name="continue" value="Continue"></p> </form> <?php session_start(); require_once 'rendezvousClass.php'; $data = new Rendezvous(); if (isset($_POST['continue'])) { if ($_POST['email'] == "") { echo "Username is required!"; } else { if ($data->checkUsername($_POST['email']) != null) { $_SESSION['username'] = $_POST['email']; header("Location:securityQuestions.php"); } else { echo "Username doesn't exist!"; echo "<br /><br /><a href='signup.php'>Click here to Sign Up!</a>"; } } } ?> </body> </html>