Hello, how could I make a page redirect system with PHP?
Being more specific, it would be the following, I have a page of tests with only 2 inputs, one to send and another to insert a text. If it enters a certain code correctly it is redirected to some page, otherwise an error message appears to it (but nothing like an alert in the middle of the screen, I'm more to make a small stylized box containing some text appear, for example " Code nonexistent ").
For example, let's say I have these 4 codes: teste1
teste2
teste3
teste4
They would be like passwords, if the user types the teste1
it is redirected to the página1.php
if you enter the teste2
it is redirected to the página2.php
and so it goes ..
But if he does not enter anything, the error appears as I mentioned.