lundi 21 mai 2018

PHP if (text from mysql="nie") then do action

Table mysql


PHP code:

$wartosc = "SELECT `register.php` FROM `onoff` WHERE `Id`='1'";
if ($wartosc == 'nie') {
    header("Location: nopage.html");
    exit;
}

And my question is how to do this because it isn't working :(

SELECT `register.php` FROM `onoff` WHERE `Id`='1'

this return 'nie' but this isn't working. Can you help me and tell me where I made any mistake?

Aucun commentaire:

Enregistrer un commentaire