So I'm new to PHP and compared to other languages I've used, some things in PHP just don't make any sense to me.
My code currently
$secret = $_POST['secret']; //HTML input to enter secret code to unlock easter egg
$theSecret = "1234"; //Pre-defined test code
enter code here
if($secret !== $theSecret){
echo "You got the secret wrong!";
exit;}
Now in C++ or C# this would work and it makes sense, but however in PHP when I use !== it will always equal true, and when I use === it's as if nothing is even checked because it always passes.
What I'm trying to achieve is if the code is correct then I can proceed, if it is not correct then terminate the connection. Is there something I am unaware of that I am doing wrong? PHP has not been nice to me, I appreciate everyone's help.