title: how to get parameter for an ajax request in php
body: <p>Edit: I solved my prblem, eveyone. I have linked to a wrong javascript page. thats silly. thank u very much though  </p>
  
  <p>I have an ajax request GET with parameter random: yes, but when I use PHP to check for the parameter, the parameter doesn't seem to exits</p>
  
  <p>my code is like this:
  for ajax</p>
  
  <pre><code>function fetchData() {
      new Ajax.Request("webservice.php", {
          method: "get",
          parameters: {random: "yes"},
          onSuccess: displayData,
          onFailure: ajaxFailure,
          onException: ajaxFailure
      });
  }    
  </code></pre>
  
  <p>and I write PHP to check the parameter </p>
  
  <pre><code>if ($_GET["random"] == "yes"){ 
      do something
  }else if(isset($_REQUEST["poll"]) &amp;&amp; $_SERVER["REQUEST_METHOD"] == "GET"){ 
      //this is b/c i have another ajax request with parameters {poll: "favChar"},
      do something
  }
  </code></pre>
  
  <p>I get the error of making ajax request. I have check my PHP code. I enter wwww.domainname.com/webservice.php?random=yes and the page output the results correctly.
  Can someone help me? Thank u </p>