Ver Mensaje Individual
  #16 (permalink)  
Antiguo 19/04/2011, 04:02
Avatar de KoswiDigital
KoswiDigital
 
Fecha de Ingreso: abril-2011
Ubicación: Galicia - España
Mensajes: 220
Antigüedad: 13 años
Puntos: 37
Respuesta: problema con formulario

Podrías hacerlo de la siguiente manera:

Código PHP:
Ver original
  1. if( !$mail->smtp_send($de, $a, $header, $cuerpo, $cc, $bcc) )
  2. {
  3. echo '<script type="text/javascript">alert("mensaje no enviado"); window.back();</script>';
  4. exit();
  5. }
  6. else
  7. {
  8. echo '<script type="text/javascript">location.href = "contacto.php?enviado=si";</script>';
  9. exit();
  10. }
  11. }
  12. else
  13. {
  14.   echo '<script type="text/javascript">alert("mensaje no enviado"); window.back();</script>';
  15.   exit();
  16. }


Saludos.
__________________
http://www.koswidigital.com - Diseño web, Programación web, Fotografía profesional, Retoque digital.