Querying an API with form using GET (PHP:Curl, Javascript)

2 thinks I notice in your code.

  1. CURLOPT_URL => "https://api.traveladviceapi.com/search/".$cc., you have a dot at the end of your variable.
  2. you have to initialize the $cc variable $cc = $_GET['cc'];

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top