Jump to content

database loop


rn14

Recommended Posts

Im trying to pass the values returned to the variable $to so that a message is sent to each number individualy but it only sends it to one number not them all

 

$query = "SELECT `mobile` FROM `customer`";

    $result = mysql_query($query) or die(mysql_error());

    $number = array();

    while(list($mobile) = mysql_fetch_row($result)) { $number[] = $mobile; }

 

    // Test it

    foreach($number as $mobile) { echo $mobile . "<br>"; }

 

 

 

 

 

$user = "xxxx";

$password = "";

$api_id = "";

$baseurl ="http://api.clickatell.com";

$text = $_POST['text'];

$to = $mobile;

Link to comment
https://forums.phpfreaks.com/topic/39487-database-loop/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.