Advertisement
Guest User

Untitled

a guest
Mar 1st, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. require('db.php');
  2.  
  3. if($_POST['id']);
  4.  
  5. {
  6. for($i=0; $i<count($_POST['id']); $i++)
  7.  
  8. {
  9.  
  10.  
  11. $msjn=$_POST['mensaje'];
  12. $idfoto=$_POST['id'];
  13. $nomb=$_POST['nombre'];
  14. $r1=$_POST['responsable1'];
  15. $r2=$_POST['responsable2'];
  16. $esms=$_POST['estado_sms'];
  17. $conc=$_POST['concepto'];
  18. $fc=$_POST['fecha'];
  19. $d=$_POST['dia'];
  20. $m=$_POST['mes'];
  21. $an=$_POST['ano'];
  22. $cm=$_POST['cm'];
  23.  
  24. $nmob=$_POST['mobile'];
  25.  
  26.  
  27.  
  28. $query="INSERT INTO sms (id, nombre, responsable1, responsable2, estado_sms, concepto, fecha, mobile, mensaje, dia, mes, ano) VALUES ('".$idfoto[$i]."','".$nomb[$i]."','".$r1[$i]."','".$r2[$i]."','".$esms[$i]."','".$conc."','".$fc[$i]."','".$nmob[$i]."','".$msjn."','".$d."','".$m."','".$an."')";
  29. $r = $conexion->query($query);
  30.  
  31.  
  32. //envio del sms
  33. $umob=implode($nmob);
  34. header("Location: https://sms.net/eapi/submission/send_sms/2/2.0?username=".$usuario."&password=".$pass."&message=".$msjn."&msisdn=".$umob."".$telf."");
  35.  
  36. //Aqui debe redireccionarme a la pagina principal
  37. $alerta="Mensaje enviado Exitosamente!";
  38. header("Location: ../pagina_principal.php?msj=".$alerta." ");
  39.  
  40.  
  41.  
  42.  
  43.  
  44. }
  45.  
  46.  
  47.  
  48.  
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement