You are here: Re: Variable email address « PHP Programming Language « IT news, forums, messages
Re: Variable email address

Posted by Acrobatic on 11/30/07 23:49

Your $sendTo isn't really variable, it's set to a static email
address. You might want to change that to

$sendTo = $_POST['email']

before you issue the "mail" command.



On Nov 30, 12:06 pm, windub <peterelliottbr...@gmail.com> wrote:
> Hi...
>
> I would like to capture an email address from a form and send a copy
> of the mail to that user. Can anyone give the correct code?
>
> Below is the script I am using.
>
> Thanks for your help.
>
> <?php
> /
> $sendTo = "pe...@deahipprovider.co.uk";
> $subject = "New Enquiry";
>
> $headers = "From: " . $_POST["firstname"] ." ". $_POST["lastname"] .
> "<" . $_POST["email"] .">\r\n";
> $headers .= "Reply-To: " . $_POST["email"] . "\r\n";
> $headers .= "Return-path: " . $_POST["email"];
>
> $message = $_POST["message"];
>
> mail($sendTo, $subject, $message, $headers);
> $sendTo = ["email"];
>
> ?>

 

Navigation:

[Reply to this 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

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