title: Passing the ID to url string via jquery and then picking it by PHP without page refresh?
body: <p>I want to pass the ID to the urlstring  via jQuery without refreshing jQuery and <code>#</code> tag so that I could get the ID via php <code>$_get['ID']</code> function.</p>
  
  <p>But the problem is that</p>
  
  <ol>
  <li>If I use <code>#</code>, page did not get refreshed, however PHP did pick the ID from url.</li>
  <li>If I don't use #, then php do picks the ID but Page get refreshed.</li>
  </ol>
  
  <p>I want to pass an id to php without refreshing the page. </p>
  
  <pre><code>//javascript
  function com(id) {
      location.href = '#?ID=id'; //by this way way,page doesn't refresh, ID appears in the url string but ID is not picked by  PHP as # is there
      // location.href = '?ID=id';   this way way, ID appears in the url string , ID is also  picked by  PHP as # is there.But page get refreshed.
      $.ajax({
          type: "Post",
          url: "getdata.php",
          async: true,
          cache: false,
          success: function(data) {},
      });
  }​
  </code></pre>
  
  <p>&nbsp;</p>
  
  <pre><code>//php for getdata.php
  &lt;?php  echo $_GET['ID'];    ?&gt;
  </code></pre>