web services - How to pass values to a PHP function via URL? -
i have various functions written inside class in php file, want pass value function browser check whether gets inserted in db.
sample code:
<? class chat { var $db; . . function chat() { $this->initialize(); } function insertmessage($text) { $text = (string) $_get["message"]; . //insert query . } } ?>
i tried http://localhost/www/chat/chat.php/chat.insertmessage?text=%27message%27&[]
didn't response.
replace
$text = (string) $_get["message"];
with
$text = (string) $_get["text"];
Comments
Post a Comment