My wordpress page URL is like this
https:www/thanks-page/?origin_name=Sydney&origin_iata=SYD&destination_name=Ahmedabad&destination_iata=AMD
I need to display SYD and AMD in to the page content like this..
Flights from SYD to AMD...
How can I display those two Param query sting in to the actual wordpress page.
Thanks in advance.
My wordpress page URL is like this
https:www/thanks-page/?origin_name=Sydney&origin_iata=SYD&destination_name=Ahmedabad&destination_iata=AMD
I need to display SYD and AMD in to the page content like this..
Flights from SYD to AMD...
How can I display those two Param query sting in to the actual wordpress page.
Thanks in advance.
Share Improve this question asked Jun 26, 2019 at 3:35 RakeshRakesh 31 bronze badge 1- 1 Not really a WordPress question, this is basic PHP. You can use $_GET for parameters in the url. – ngearing Commented Jun 26, 2019 at 3:44
2 Answers
Reset to default -1Simple, you can use $_GET method.
if(isset($_GET["origin_iata"]) && !empty($_GET["origin_iata"]) && isset($_GET["destination_iata"]) && !empty($_GET["destination_iata"]))
{
echo "Flights from ".$_GET["origin_iata"]." to ".$_GET["destination_iata"]."...";
}
You just use $_GET["origin_iata"]
and $_GET["destination_iata"]
to get those two Params you need
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745369162a4624721.html
评论列表(0条)