Guest User

Untitled

a guest
Jan 16th, 2018
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. var proyectos = [{"Paso1": selectEmpStar},{"Paso2": selectEtapa},{"Paso3": selectServ},{"Paso4": selectCarac},{"Paso5": selectCuent},{"Paso6": selecDatos}];
  2.  
  3. var datos = JSON.stringify(proyectos);
  4. jQuery.ajax({
  5. type: 'POST',
  6. cache: false,
  7. url:'<?php echo admin_url('admin-ajax.php') ?>',
  8. data:{
  9. action: 'contact_send',
  10. dataProyectos : datos,
  11. dataAsunto : valNombres
  12. },
  13. success: function() {
  14. alert("Mensaje Enviado");
  15. }
  16. });
  17.  
  18. function callback_contact_send() {
  19. $send_to = 'ejemplo@hotmail.com';
  20. $subject = $_POST['dataAsunto'];
  21. $message = $_POST['dataProyectos'];
  22. $headers .= "MIME-Version: 1.0rn";
  23. $headers .= "Content-type: text/htmlrn";
  24. $headers .= 'From: proyectos-tecnologicos' . "rn" .
  25. 'X-Mailer: PHP/' . phpversion();
  26.  
  27. $mail = mail($send_to,$subject,$message,$headers);
  28. if($mail){
  29. echo "Mensaje enviado";
  30. }else{
  31. echo "Error";
  32. }
  33. die();
Add Comment
Please, Sign In to add comment