My code (below) throws a notice, but I don't know how to fix it
Undefined index in Session, ...
<?php
    if($_SESSION['snt'] && $_SESSION['sps']){
        echo "<font color=orange>" . "Selamat Datang " . $_SESSION["snt"] . "<a href='?ak=logout'> LOGOUT </a>" . "</font>";
    } else {
        echo "<a href='?ak=form_login'> LOGIN </a>";
    }
?>
Notice:
Notice: Undefined index: snt in C:\xampp\htdocs\Dota2\FUNGSI\login.php on line 2
 
    