Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require('db.php');
- if($_POST['id']);
- {
- for($i=0; $i<count($_POST['id']); $i++)
- {
- $msjn=$_POST['mensaje'];
- $idfoto=$_POST['id'];
- $nomb=$_POST['nombre'];
- $r1=$_POST['responsable1'];
- $r2=$_POST['responsable2'];
- $esms=$_POST['estado_sms'];
- $conc=$_POST['concepto'];
- $fc=$_POST['fecha'];
- $d=$_POST['dia'];
- $m=$_POST['mes'];
- $an=$_POST['ano'];
- $cm=$_POST['cm'];
- $nmob=$_POST['mobile'];
- $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."')";
- $r = $conexion->query($query);
- //envio del sms
- $umob=implode($nmob);
- header("Location: https://sms.net/eapi/submission/send_sms/2/2.0?username=".$usuario."&password=".$pass."&message=".$msjn."&msisdn=".$umob."".$telf."");
- //Aqui debe redireccionarme a la pagina principal
- $alerta="Mensaje enviado Exitosamente!";
- header("Location: ../pagina_principal.php?msj=".$alerta." ");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement