<?php
// Initialize the session
// require_once "config.php";
include_once 'header.php';

if (!isset($_SESSION)) {
  session_start();
}

 function base64_url_decode($input)

{

return base64_decode(strtr($input, '-_,', '+/='));

}

$usernamecurrenttosend = $_GET['usernamecurrent'];
$usernamecurrenttosend = base64_url_decode($usernamecurrenttosend);
                              $sqlEmailVerified = "UPDATE users SET email_verified='True' WHERE username='$usernamecurrenttosend'";
                              $stmt2 = $mysqli->prepare($sqlEmailVerified);
                               if($stmt2->execute())
                               {
                                   header("location:login.php");
                               }

include_once 'footer.php';                           
?>


