Advertisement
cdsatrian

send_sms_status.php

Apr 15th, 2013
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.77 KB | None | 0 0
  1. <?php
  2. include "koneksi/koneksi.php";
  3. $id_group = $_POST['status'];
  4. $isi_pesan = $_POST['isi_pesan'];
  5.  
  6. $sql = mysql_query("SELECT hp FROM tbl_penerima WHERE status IN('".implode("','",$id_group)."')");
  7. while ($data = mysql_fetch_array($sql)){
  8.   $hp = $data[hp];
  9.   $kirim = mysql_query("insert into outbox (InsertIntoDB,SendingDateTime,DestinationNumber,Coding,TextDecoded,SendingTimeOut,DeliveryReport,CreatorID)
  10.  values(sysdate(),sysdate(),'$hp','Default_No_Compression','$isi_pesan',sysdate(),'yes','system')");
  11. }
  12. if ($kirim){
  13.   echo "<h4> Pesan berhasil dikirim </h4>";
  14.   echo "<meta http-equiv='refresh' content='1; url=sms_groupstatus.php'>";
  15. }
  16. else {
  17.   echo "<h4> Gagal dikirim </h4>";
  18.   echo "<meta http-equiv='refresh' content='1; url=sms_groupstatus.php'>";
  19. }
  20. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement