<?php 

session_start(); 



$memo1 = $_POST['memo1']; 

$memo2 = $_POST['memo2'];

$memo3 = $_POST['memo3'];

$memostring = $_SESSION['current_memo'];

$mem1 = substr($memostring,$_SESSION['rand1'],1);

$mem2 = substr($memostring,$_SESSION['rand2'],1);

$mem3 = substr($memostring,$_SESSION['rand3'],1);

$pwd1 = $_POST['pwd1']; 

$pwd2 = $_POST['pwd2'];

$pwd3 = $_POST['pwd3'];

$pwdstring = $_SESSION['encryptcode'];

$pass1 = substr($pwdstring,$_SESSION['randpwd1'],1);

$pass2 = substr($pwdstring,$_SESSION['randpwd2'],1);

$pass3 = substr($pwdstring,$_SESSION['randpwd3'],1);

if ($memo1 == $mem1 && $memo2 == $mem2 && $memo3 == $mem3 && $pwd1 == $pass1 && $pwd2 == $pass2 && $pwd3 == $pass3 ) {

header("Location:0_2_Service_info.php");

}elseif ($memo1 == "" || $memo2 == "" || $memo3 == "" || $pwd1 == "" || $pwd2 == "" || $pwd3 == "" ) {

$error = "Empty Password or PIN information.  Try again!"; 

header("Location:0_1_Enter_pin.php?message=$error");

}else{

$error = "Invalid Password or PIN information.  Try again!"; 

header("Location:0_1_Enter_pin.php?message=$error");

}



if (!$_SESSION['unamename']) { 

    $error = "You are not logged in!"; 

	header("Location:login.php?message=$error");

    exit(); 

} 

?>