I have write some code for send sms to multiple users with database values i will get the mobile numbers to that code but i will send sms to that only single mobile number msg can passed remain numbers not accepting but i have send the no of mobile numbers are there all members msg will send i will write some code in here once check how to send and also i will try this code working only one mobile number
in the below code i will get records 2.
mobile numbers are also display 2 values.
sendSMS() function i will placed in while loop and outer while loop but last record will be selected.
$get_donor = "SELECT * FROM donor_register WHERE `dnr_bloodgroup` ='$blood_group' and `dnr_city` = '$city' ";
$get_result = $conn->query($get_donor);
$count = $get_result->num_rows;
if($count > 0)
{
while($row = $get_result->fetch_assoc())
{
$phone ='';
$phone .=$row['dnr_phone'];
echo $phone;
}
sendSMS("Pname",$phone,$message);
}
My sendSMS function like this
function sendSMS($sender, $mobile_number, $message)
{
//some code
}
I Expected out put is Pname 3214569870,7412589630,4561237890... this will i will ecpected
But i have get it pname 3214569870 only.