$(function() { var pageUrl = document.getElementById('pageurl').value; $('#zip_business').autocomplete({ serviceUrl: pageUrl + "businesses/ajax.php", extraParams: { country: function() { return $('#country').val(); } } }); });
$sqlData = mysql_query("SELECT * FROM zipcodes WHERE zip LIKE '".$_REQUEST['q']."%' AND country='".$_REQUEST['country']."'"); $values = ''; while ($getData = mysql_fetch_array($sqlData)) { $values.=$getData['zip'] . "," . $getData['full_state'] . "," . $getData['city'] . "|" . $getData['zip'] . "\n"; } echo $values;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)