lundi 1 mai 2017

execute php statement if button is clicked

I want to execute a php statement if my html button is clicked, so i created a button like this :

<input name="logout" type="submit" id="submit" value="logout" />

And then i have a php condition :

if (isset($_POST['logout']))
        {
                echo "Hello world!";
        }

But this don't work and i really don't know why, if someone please can help me it will be greatfull.

Aucun commentaire:

Enregistrer un commentaire