Question

My wordpress page URL is like this

https:www.com/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.

Was it helpful?

Solution

Simple, 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"]."...";
}

OTHER TIPS

You just use $_GET["origin_iata"] and $_GET["destination_iata"] to get those two Params you need

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top