Answer the question
In order to leave comments, you need to log in
How to redirect a person with a get request?
A person entering the cart goes to page ../page_order.php?action=onclick
If he goes to page ../page_order.php, the page will be displayed clumsily.
How to make it so that when going to ../page_order.php it would be transferred to ../page_order.php?action=onclick via a GET request, or maybe somehow differently?
Answer the question
In order to leave comments, you need to log in
At the beginning of the script we write:
if ( ! isset($_GET['action']) || $_GET['action'] !== 'onclick') {
header('Location: ' . PHP_SELF . '?action=onclick'); exit(0);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question