P
P
prrrrrrr2019-11-22 15:30:41
PHP
prrrrrrr, 2019-11-22 15:30:41

How to solve the problem with endless redirects?

The code:

if($_GET['step'] != "1" || $_GET['step'] != "2" || $_GET['step'] != "3")
{
    header("Location: ?step=1");
}

Problem:
The site * has redirected too many times.

Why?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2018-11-24
@AleksandrB

I solved the problem.
It consisted in the fact that pdo generates data in quotes, that is:
After connecting to the database, it was necessary to cancel such a transformation:
Now everything is working!
Answer that helped me

L
Lazy @BojackHorseman PHP, 2019-11-22
@prrrrrrr

because the condition in if is always true

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question