FrontlineSMS allows you to text message with large groups of people anywhere there is a mobile signal.
This script is nonresponsive i.e. frontline sends a blank sms as an autoreply when i send a message with the keyword 'MARKET' or 'RICE'.below is the edited script:
WHERE MIGHT BE THE PROBLEM? Help to edit please.
<?php
$server="localhost";
$user="root";
$pass="NANOTECHZ";
$db="bidhaa";
$market=$_GET['product'];
mysql_connect("$server","$user","$pass");
mysql_select_db("$db") or die('CANNOT CONNECT TO Bidhaa DATABASE');
$query = mysql_query( "SELECT * FROM `prices` WHERE market=\'$market\';)");
$msg=$market;
While ($result=mysql_fetch_array($query,MYSQL_ASSOC))
{
$msg= $msg." ".$result['maize']." ".$result['onions']." ".$result['rice']." ";
}
echo $msg;
?>
the frontline confg is:
http://localhost/htdocs/market.php?product=${message_content}
(i am using xampp server)
HOW I WANT IT TO BE:
when FLSMS recieves an sms with a keyword either the name of the market for example 'TABAKA', or the name of the commodity e.g. 'MAIZE' , it calls the php script which returns the various commodity prices which FLSMS inturn sends the result to the sender as an autoreply.
THIS IS THE 'PRICES' TABLE:
| id | MARKET | MAIZE | ONIONS | RICE | |||
|---|---|---|---|---|---|---|---|
| 1 | TABAKA | 50 | 200 | 180 | |||
| 2 | RONGO | 55 | 220 | 185 | |||
| 3 | SUNEKA | 60 | 250 | 190 | |||
Tags:

Permalink Reply by Alex Anderson on March 21, 2011 at 6:28am Hi Paul,
Is there any chance you can share a screenshot of your external command setup? This way we can check all your settings are as expected.
Thanks,
Alex

Permalink Reply by Alex Anderson on March 22, 2011 at 7:23am Hi!
Looks like there is an error in your script - it's being reported in the outgoing message from FrontlineSMS.
Try accessing your script in a web browser and seeing if it performs as expected there.
Alex
© 2013 Created by kiwanja.net.
Powered by