<?php
session_start();

if(isset($_POST['otp'])){
    if($_SESSION['otp'] == $_POST['otp']){
        $_SESSION['phone'] = $_SESSION['otp_phone'];
        unset($_SESSION['otp']);
        unset($_SESSION['otp_phone']);
        echo "success";
    } else {
        echo "failed";
    }
}
?>
