<?php
    
if (isset($_GET['source'])) {
        
highlight_file($_SERVER['SCRIPT_FILENAME']);
        exit;
    }
    
session_start();
?>

<html>
    <head>
        <title>Registration Form Summary</title>
        
         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="theme-color" content="#B5C7DD" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        
        <link rel="stylesheet" href="css/reset.css">
        <link rel="stylesheet" href="css/mandy.css">
        <link rel="stylesheet" href="css/form.css">

<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon">
    </head>
    <style>

    </style>
    <body>            

    <?php
        
function form() { # displays the form
            
echo "<p class=\"fancy\">Username: "output($_SESSION["user"]), 
            
"</p>";

            echo 
"<p class=\"fancy\">Email: "output($_SESSION["email"]), "</p><p>A <span class=\"fancy\">valid Password</span> has been set! <br />(not displayed for security reasons, I hope you remember it.)</p>";
        }
        
        function 
output($var) { # displays the output variables
            
echo "$var";        
        }        
    
?>
        <h3 class="nudge">Registration Complete!</h3>
        
            <p>Below are your basic account info and login details</p>
    <div class="login">    
        
        <?php form(); ?>
        
    </div>
<!--        I commented out the submit button to reduce user clicks-->
        <form method="POST" action="confirmation.php">
        <button type="button" onclick="history.go(-1);">Back</button>
<!--        <input class="button" name="submit" type="submit" value="Submit">-->
        </form>
    
    <?php
        session_unset
();
        
session_destroy();    
    
?>
        
     <p class="hide">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
</p>
  
    <div class="stretch"></div>    
        
    </body>
</html>