Offline Posted April 30, 2012 at 03:42 PM Report #452289 Posted April 30, 2012 at 03:42 PM Olá pessoal. Utilizei a clases PHPmailer para enviar email a partir dum formulário de contacto. Embora esteja a receber os email, surgiram-me as seguintes dúvidas. 1. Após sucesso no envio do email, como é que posso encaminhar o visitante para uma página de agradecimento? if ($enviado) { echo "Email successfully sent!"; header('Location: http://www.luisporem.com/contacts/html/thankyou.html'); O código que tenho é este mas, embora o email seja enviado sem problemas, surge o seguinte aviso: Warning: Cannot modify header information - headers already sent by (output started at /home/pg29148/public_html/contacts/html/sendmail.php:1) in /home/pg29148/public_html/contacts/html/sendmail.php on line 61 Será que alguém me consegue dar uma dica? 😄
HappyHippyHippo Posted April 30, 2012 at 03:45 PM Report #452293 Posted April 30, 2012 at 03:45 PM sim ... tira o echo IRC : sim, é algo que ainda existe >> #p@p Portugol Plus
Offline Posted April 30, 2012 at 03:53 PM Author Report #452294 Posted April 30, 2012 at 03:53 PM Dá o mesmo erro... Warning: Cannot modify header information - headers already sent
nunolevezinho Posted April 30, 2012 at 03:56 PM Report #452296 Posted April 30, 2012 at 03:56 PM escreve ob_start(); na 1º linha.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now