/    Sign up×
Community /Pin to ProfileBookmark

I recieve this error wehen sending messages using my mail.php form, but I don’t know why they occur?

Warning: Cannot add header information – headers already sent by (output started at /home/*/public_html/proba/mail.php:1) in /home/****/public_html/proba/mail.php on line 10

THIS IS MY mail.php

<title>sendmail form</title><?php

$headers .= “From: $email n”;
$headers .= “Content-Type: text/plain; charset=iso-8859-1n”;
$recipient = “[email protected]“;
$subject = “Pictures “;
$msg = wordwrap( $list, $probni, 1024 );
mail($recipient, $subject, stripslashes($msg), $headers);

header(“location: thanks.php”);
?>

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@AdamGundryJun 10.2003 — You can't use header() if you have already sent HTML to the client, which you have in your <title> tag. Remove all HTML before the start of the PHP script, and it should work.

Adam
Copy linkTweet thisAlerts:
@dovlasrMar 18.2008 — Could you please delete

/home/****/public_html/proba/mail.php

as it reveals personal info to search engines!!! I tried contacting admins but have no right for PMs yet..
Copy linkTweet thisAlerts:
@dovlasrMar 18.2008 — also, this topic here contains URLs that contain my personal info, so please delete them as well..

http://www.webdeveloper.com/forum/showthread.php?t=10530

Sorry for double posting, but Edit didn't work..

Thank you!
Copy linkTweet thisAlerts:
@KorApr 03.2008 — also, this topic here contains URLs that contain my personal info, so please delete them as well..

http://www.webdeveloper.com/forum/showthread.php?t=10530

Sorry for double posting, but Edit didn't work..

Thank you![/QUOTE]

OK, done
×

Success!

Help @svenicsale spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...