First convert the $_GET
HTTP variable into a query string using
$query = http_build_query($_GET);
Then append the query string variable to your redirect header
header('location: domain.com'."?".$query);
Done.
More Related Contents:
- Beautiful way to remove GET-variables with PHP?
- How to set $_GET variable
- How can I combine two strings together in PHP?
- Returning JSON from a PHP Script
- How to add elements to an empty array in PHP?
- Access a JavaScript variable from PHP
- Curl and PHP – how can I pass a json through curl by PUT,POST,GET
- Test if number is odd or even
- instantiate a class from a variable in PHP?
- Reading and Writing Configuration Files
- PHP variables in anonymous functions
- PHP curly brace syntax for member variable
- Access PHP var from external javascript file
- Accessing a class constant using a simple variable which contains the name of the constant
- Passing multiple variables to another page in url
- Symfony2 – Force file download
- PHP, display image with Header()
- PHP check whether property exists in object or class
- Sanitizing user’s data in GET by PHP [duplicate]
- Bad Request. Connecting to sites via curl on host and system
- HTTP response code after redirect
- Storing Form Data as a Session Variable
- In PHP, is there a short way to compare a variable to multiple values?
- How to concatenate PHP variable name?
- PHP: Create an array for a range
- Which line break in php mail header, \r\n or \n?
- Authorization header missing in PHP POST request
- Replacing variables in a string
- Does Perl have PHP-like dynamic variables?
- Is it possible to preserve plus signs in PHP $_GET vars without encoding?