The idea is that when the user click the send button a javascript alert will popUp saying that the mail was sent.
The prob is that this code is giving me the following error after pressing the send button:
"Warning: Cannot modify header information - headers already sent by (output started at /home/vitormjl/public_html/process.php:18) in /home/vitormjl/public_html/process.php on line 19"
whenever you request a page from a server, that page is sent back to you (your browser), including a whole bunch of headers. For example, the headers can tell the browser that the page doesn't exist (a 404) or that a page has been moved to a new location, so the browser can immediately redirect, etc. etc.
With the header() function you can alter these headers somewhat. But, of course this requires that no output has been sent to the users browser yet. Because, any data sent to the user, will have to be accompanied by some headers.
So, either you have to solve this by outputting a whole page, including the javascript alert and a meta-tag that redirects the browser, or you have to pass along the message to the next page (storing it in a GET var or in the SESSION)
Bookmarks