سلام کدها تا مرحله پایین کار میکنن بعد از ان صفحه verify را بالا نمیاد و صفحه login میاد نمیدونم مشکل کجاست
<?php
include "bootstrap/init.php";
if($_SERVER['REQUEST_METHOD'] == 'POST' ){
$action = $_GET['action'];
$params = $_POST;
if($action == 'register'){
if(empty($params['name']) || empty($params['email']) || empty($params['phone'])){
serErrorAndRedirect('all input field is required','auth.php?action=register');
}
if(!filter_var($params['email'] ,FILTER_VALIDATE_EMAIL)){
serErrorAndRedirect('enter the valid email','auth.php?action=register');
}
if(isUserExists($params['email'] ,$params['phone'])){
serErrorAndRedirect('user exists whih this data','auth.php?action=register');
}
if(CreatUser($params)){
$_SESSION['email'] = $params['email'];
redirect('auth.php?action=verify');
};
}
}
if(isset($_GET['action']) && $_GET['action'] == 'verify' && !empty($_SESSION['email']))
include 'tpl/verify-tpl.php';
if(isset($_GET['action']) && $_GET['action'] == 'register'){
include 'tpl/register-tpl.php';
}else{
include 'tpl/login-tpl.php';
}