Jump to content

Recommended Posts

Posted

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?  😄

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.