title: The location which i have selected in search bar should reflect in mydealers.php page
body: <p>I have implemented autocomplete search bar for my website. I will select location in the index.php page. The selected location from index.php page has to reflect to mydealers.php page also. but its not happening. instead it's showing some other location name.</p>
  
  <p>Html Code</p>
  
  <pre><code>&lt;div style=margin-left:500px;margin-top:-40px;width:500px&gt;
    &lt;?php
       echo " &lt;select data-live-search='true' data-live-search-style='startsWith' class='selectpicker' id='locName'&gt;";
       $stmt = $conn-&gt;prepare('SELECT LocationName From arealistmain');
       $stmt-&gt;execute();
           while($row = $stmt-&gt;fetch()) {
              echo  " &lt;option&gt;" .$row['LocationName'] . "&lt;/option&gt;";
          }
      echo "&lt;/select&gt;";
  
    ?&gt;
  &lt;/div&gt;
  Java Script
   &lt;!--AutoComplete Search bar--&gt;
  $(function() {
      $("#locName").autocomplete({
  
          minLength: 1,
          function(event) {
              var value = event.getAttribute('value')
              var locName = document.getElementById("locName").value;
              if (value.includes('&amp;')) {
                  value = value.replace("&amp;", "%26");
              }
              if (locName == "") {
                  alert("Please Select your Location");
              } else {
                  window.location = "http://www.citycontact.in/MyDealers.php?id="+value+"&amp;locName="+locName;
              }
              return false;
          }
  
      });
  });
      &lt;!--Auto Complete For Categories--&gt;
      function Demo(anchor) {
          var value = anchor.getAttribute('value')
          var locName=document.getElementById("locName").value;
          if(value.includes('&amp;')){
              value = value.replace("&amp;", "%26");
          }
         if(locName==""){
             alert("Please Select your Location");
         } else {
             window.location = "http://www.citycontact.in/MyDealers.php?id="+value+"&amp;locName="+locName;
         }
      } 
  </code></pre>