redirect php using header in the same directory code example
Example: php header redirect same page
header("Location: " . "http://" . $_SERVER['HTTP_HOST'] . $location);
header("Location: " . "http://" . $_SERVER['HTTP_HOST'] . $location);