I used following code to dynamically fill DropDown controls using AJAX. Each time a DropDown control is clicked, following statement transfers the query to an AJAX function which then forwards to a .php file to retrieve the database results.The problem is that the same code works absolutely fine when used on the local machine even if the MySQL connection string is using the same remote server's IP address as the host. But when I upload the files to the remote server, all DropDowns fill the same results. For example, if there are three DropDowns viz: District, Constituency, City and if I click say, City, than all the other DropDowns also shows cities in their list.I guess the query string that I am using in the following AJAX function is not refreshing.[HTML DropDown Code Sample]\[code\]<div id="divDistrict" name="divDistrict"> <select class="element select medium" id="inDistrict" name="inDistrict" onclick="MakeRequest('divDistrict', 'inDistrict', 'SELECT * FROM districtmaster');"> <option value="http://stackoverflow.com/questions/1988666/Select" selected="Select">Select</option> </select></div>\[/code\][AJAX Function]\[code\]function MakeRequest(DivName, DropDownName, SqlQuery){ var xmlHttp = getXMLHttp(); var strUrl = "../Lib/filldropdown.php?DivName=" + DivName + "&DropDownControlName=" + DropDownName + "&SqlQuery=" + SqlQuery; try { xmlHttp.onreadystatechange = function() { if (xmlHttp.readyState == 4) { HandleResponse(xmlHttp.responseText, DivName); } } xmlHttp.open("GET", strUrl, true); xmlHttp.send(null); } catch(err) { alert(err); }}\[/code\][The PHP file code] \[code\]<?php require("dbconnection.php"); require("dbaccess.php"); $dropdownControlName = $_GET['DropDownControlName']; $query = $_GET['SqlQuery']; dbconnection::OpenConnection(); $result = dbaccess::GetRows($query);?><select name=" <?php $dropdownControlName ?> "><option>Select from the list</option><?php while($row=mysql_fetch_array($result)){ ?> <option value="http://stackoverflow.com/questions/1988666/<?= $row[0] ?>"><?= $row[1] ?></option><?php } ?></select>\[/code\]Please ignore the DBAccess & DBConnection references. Those files contains simple mysql_query & mysql_connect functions. Also, I am aware of the risk of passing the query in the query string. I will fix it once the DropDown fill works correctly.