title: How to pass values to a PHP function via URL?
body: <p>I have various functions written inside the class in PHP file, I want to pass the value to function from my browser to check whether it gets inserted in my db.</p>
  
  <p>sample code:</p>
  
  <pre><code>&lt;?
   class Chat {
   var $db;
       .
       .  
  
  function Chat() {
      $this-&gt;initialize();
  }
  function insertMessage($text) {
      $text = (string) $_GET["message"];
        . //insert query
        .
    } 
  }   ?&gt;
  </code></pre>
  
  <p>I tried with <code>http://localhost/www/Chat/chat.php/chat.insertMessage?text=%27message%27&amp;[]</code> but I didn't get any response.</p>