Am a newbie and i am getting an error on line 26 of my code i cant understand what causes the error as it is making me not to be able to send sms anyhelp will be appreciated
<?php
$gw_host="10.0.0.9";
$value=$_POST['value'];
urlencode($message)=$_POST['message'];
$con = mysql_connect("localhost","db_host","xxxxxx");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("aic_sms", $con);
$result = mysql_query("SELECT phn_number FROM users WHERE message=$value");
if($result){
while($row = mysql_fetch_array($result)) {
function sendSmsMessage($phn_number, $message)
{
$ch= curl_init();
curl_setopt($ch, "http://10.0.0.15/process_sms/sendsms.php?recipient=$phn_number&msg=" . urlencode($message));
curl_exec($ch);
curl_close($ch);
}
}
else {
echo mysql_error();
}
}
echo 'Message sent successfully';
mysql_close($con);
?>