0

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

Rizier123
  • 58,877
  • 16
  • 101
  • 156

0 Answers0