Undefined index: odhlasit [duplicate] - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Thursday, June 10, 2021

Undefined index: odhlasit [duplicate]

Notice: Undefined index: submit in E:\MAMP\htdocs\admin\logout.php on line 2

Notice: Undefined index: submit in E:\MAMP\htdocs\admin\logout.php on line 5

For some reason it's undefined and I don't know why.

    if($_POST["odhlasit"]=="Ano"){
        session_destroy(); //odhlasenie
        header("location: index.php?str=log");
    }elseif($_POST["odhlasit"]=="Nie"){
        header("location: index.php");
    }
?>

<div class="popup">
    <h1>Skutocne sa chcete odhlásiť?</h1>
    <form action="index.php?str=out" method="post">
        <input type="submit" name="odhlasit" value="Ano" style="margin-right: 32px; cursor: pointer;">
        <input type="submit" name="odhlasit" value="Nie" style="cursor: pointer;">
    </form>
</div>```


source https://stackoverflow.com/questions/67909755/undefined-index-odhlasit

No comments:

Post a Comment