basically what i'm looking at doing is take a user defined variable, in this case the name of a bird, and then inserting that variable into a url api call. I got how to parse and echo the data once I get it, I just can't seem to find anything on setting part of the url as a user defined variable. here's what I have so far
input type="text" name="idtest" value="<?php echo htmlspecialchars($searchbird); ?>" />
$url = "http://ebird.org/ws1.1/data/obs/region_spp/recent?rtype=subnational2&r=US-AZ-013&sci=$searchbird";
$xml = simplexml_load_file($url);
foreach ($xml->result->location as $location):
$locname=$location->{'loc-name'};
$lat=$location->{'lat'};
$lng=$location->{'lng'};
$locid=$location->{'loc-id'};
echo " blah blah";