title: Auto-complementary in Membership Form, slow
body: <p>Automatic membership in the form of complementary works late. Database on the slow side. Is there a way to speed up this? User does not matter.. How do I stop to write other than the automatic complementary?(Automatic complementary; city-input. membership form is located.)</p>
  
  <p>Register.php</p>
  
  <pre><code> &lt;script type="text/javascript" src="jquery.js"&gt;&lt;/script&gt;
   &lt;script type="text/javascript" src="jquery.autocomplete.js"&gt;&lt;/script&gt;
   &lt;script type="text/javascript"&gt;
   $().ready(function() {
   $("#sehir").autocomplete("CityAutoComp.php", {
      width: 312,
      matchContains: true,
      mustMatch: true,
      //minChars: 0,
      //multiple: true,
      //highlight: false,
      //multipleSeparator: ",",
      autofill:true,
      selectFirst: false
   });
   });
   &lt;/script&gt;
  </code></pre>
  
  <p>CityAutoComp.php</p>
  
  <pre><code> &lt;?php 
   session_start();
   ob_start();
  
   $con = mysql_connect("localhost","******","****");
   if (!$con)
     {
   die('Could not connect: ' . mysql_error());
   }
   mysql_select_db("*****", $con);
   $q = strtolower($_GET["q"]);
   if (!$q) return;
  
   $sql = "select DISTINCT city from location where city LIKE '%$q%'";
   $rsd = mysql_query($sql);
   while($rs = mysql_fetch_array($rsd)) {
   $cname = $rs['city'];
   echo "$cname|$\n";
   }
   ?&gt;
  
   ---
   &lt;tr&gt;
   &lt;th&gt;City:&lt;/th&gt;
   &lt;td&gt;&lt;input id="sehir" autocomplete="off" name="sehir" type="text" style="text-transform:      capitalize" class="inputbox" size="45" value="&lt;?php echo post('sehir');?&gt;" /&gt;&lt;/td&gt;
   &lt;/tr&gt;
  </code></pre>
  
  <p>Respects.
  (I apologize for my English.)</p>