0

I use the section, but this error occurs, in fact, it enters the site and everything is done correctly, but this error occurs behind the scenes. What is the solution? PHP Notice: Undefined index: walletaddrass in /home/decent/public_html/user/presale.php on line 5

$id_wallet = $_SESSION["walletaddrass"]; The quantification is done as follows: $_SESSION["walletaddrass"] = $id_wallet; setcookie('logged-in','true', time() + 286400 , '/');

1 Answers1

0

Please post the whole file where you are getting this error next time.

The issue is because you are trying to use $_SESSION["walletaddrass"] when it's not set, as you are setting it in the line below it.

You must first check if the session variable is set as follows:

    if (isset($_SESSION['walletadrass'])) {
        $id_wallet = $_SESSION["walletaddrass"];
        $_SESSION["walletaddrass"] = $id_wallet; setcookie('logged-in','true', time() + 286400 , '/');
    }
ikyuchukov
  • 565
  • 3
  • 12