<?php

   require_once($_SERVER['DOCUMENT_ROOT'] . '/_functions/users.functions.php');

   

$forgot = forgotPassword($_POST);



   $page_title = 'Forgot password';

   

   require_once($_SERVER['DOCUMENT_ROOT'] . '/_includes/header.php');

?>



      <section>

         <article class="half–blocks">

            <div>

               <h2>Forgot password</h2>

               

<p>

Your account must be active and confirmed to use this tool.

</p>



               <p>

                  Uh–oh! Did you forget your password? We can help. Submit the email address used for your account and we'll email you a temporary password. Change it to one you'll remember when you log in.

               </p>

            </div>

            

            <div>

<?php if(!empty($forgot)): ?>

<ul class="errors">

<?php foreach($forgot['errors'] as $msg): ?>

<li><?php echo $msg; ?></li>

<?php endforeach; ?>

</ul>

<?php endif; ?>



               <form class="standard–form" action="" method="post">

                  <label for="email">Account email address</label>

                  <input type="text" name="email" id="email" placeholder="Account email address" />

                  

                  <button type="submit">Send me an email</button>

               </form>

            </div>

            

            <div></div>

         </article>

      </section>



<?php

   require_once($_SERVER['DOCUMENT_ROOT'] . '/_includes/footer.php');

?>