Working with the who is my representative API (whoismyrepresentative.com ) and the get command doesn't render the results from an input field on the index page asking for a zipcode. Is the syntax incorrect, do I need to echo the command?
Index page I created:
<section class="form-one">
<form action="search-results.php" method="post">
<label for="zipcode"> Input Zipcode</label>
<input id="zipcode" type="number" name="zip" size="5">
<input type="submit" name="">
</form>
</section>
Search-Results.php page where i call the GET Command:
<?php
file_get_contents('https://whoismyrepresentative.com/getall_mems.php?zip=&output=json'.$_GET['zip'].'php?zip=&output=json …');
/*echo $_GET["https://whoismyrepresentative.com/getall_mems.php?zip=&output=json …"];*/
?>
The command should output json.
file_get_contents('https://whoismyrepresentative.com/getall_mems.php?zip='.$_GET['zip'].'&output=json');<form action="search-results.php" method="get">OR update your$_GET['zip']to$_POST['zip']