-2
Hello, how could I make a page redirect system with PHP?
Being more specific, it would be the following, I have a test page with only 2 inputs, one to send and the other to insert a text. If it type a particular 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 am more to make appear a small stylized box containing some text, for example "Nonexistent code").
Exemplifying further, let’s assume I have these 4 codes: teste1
teste2
teste3
teste4
They would be like passwords, if the user type the teste1
it is redirected to the página1.php
if type the teste2
is redirected to the página2.php
and so on..
But if he doesn’t type anything, there’s the one about the mistake I quoted.
Your question has been suspended by the community because information is missing to make it more specific, such as where the code list comes from (are they in an array?), and the part where you’re having problems (can you redirect with a fixed URL?). As it is, it is very wide, including involving aspects of user interface ("nothing like an Alert in the middle of the screen, I am more to make appear a small stylized box containing some text"). I suggest editing the question to make it as objective as possible, and the community can decide on the reopening.
– bfavaretto