O
O
OwerFan2020-05-23 16:42:48
PHP
OwerFan, 2020-05-23 16:42:48

How to redirect to another page?

How to go to another page after the script is running? The redirect will not work because I have a js insert in my code in the middle of php.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
H
Hanneman, 2020-05-23
@OwerFan

So: Or like this:
window.location.href = "http://www.example.com";
window.location.replace("http://www.example.com");

F
FanatPHP, 2020-05-23
@FanatPHP

You just need to not stand upright, but decide what your code does - displays an "insert" or a redirect.
And immediately everything will become simple and clear.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question