parameter - How to use query string in URL to display content on the wordpress page

My wordpress page URL is like this https:wwwthanks-page?origin_name=Sydney&origin_iata=SYD&destination_name=Ah

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
Add a comment  | 

2 Answers 2

Reset to default -1

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

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条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信