Reply to Re: What's Missing From This Form Mail Code?

Your name:

Reply:


Posted by Geoff Berrow on 12/08/06 10:36

Message-ID: <vikr-5BEC22.01474208122006@news.west.earthlink.net> from
Vik Rubenfeld contained the following:

> mail( "an@email.com", "subject line",
> "$text", "From: $email" );
> header( "Location: http://www.mydomain.com/Contact/thanks.html" );
>?>
>
>What am I missing? Thanks in advance to all for any info.
The first thing you are missing is some sanitising of the email address.
You need to strip out any newline characters. That isn't the problem,
just good practice.

Assuming you are replacing an@email.com with a valid email address you
could try

if(mail( "an@email.com", "subject line",
"$text", "From: $email" )){
header( "Location: http://www.mydomain.com/Contact/thanks.html" );
}
else{
echo "mail could not be sent";
}

This will check if mail is actually being received for posting.

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация