Re: Email form
by "Frank Boumphrey" <bckman(at)ix.netcom.com>
|
| Date: |
Fri, 22 Nov 2002 19:41:25 -0500 |
| To: |
"Frank Boumphrey" <bckman(at)ix.netcom.com>, "dale" <dale(at)daleznet.com>, "HWG Techniques" <hwg-techniques(at)hwg.org> |
| References: |
dale D1C4FN01 |
| |
todo: View
Thread,
Original
|
|
I'm reposting the script, somehow my script formatting got mangled!
<?php
$email=$_POST["email"];
$subject="Thanks for your comments";
$message="Dear".$_POST["firstname"].",\n";
$message.="Thank you for posting the followingcomments: -\n\n";
$message.=$_POST["comment"];
$dummy=mail($email, $subject,$message);
if($dummy)
{
echo "Thank you for your comments.We have e-mailed you";
}
?>
----- Original Message -----
From: "Frank Boumphrey" <bckman(at)ix.netcom.com>
To: "dale" <dale(at)daleznet.com>; "HWG Techniques" <hwg-techniques(at)hwg.org>
Sent: Friday, November 22, 2002 7:30 PM
Subject: Re: Email form
> Actually if you have PHP running on a UNIX box, then PHP is the way to do
it
> using the UNIX mail program.
>
> The following script emails to the email address in your form and then
> displays a '.thankyou' message.
> substitute any other address for alternate results.
>
> <?php
> $email=$_POST["email"];
> $subject="Thanks for your comments";$message="Dear
> ".$_POST["firstname"].",\n";$message.="Thank you for posting the following
> comments: -\n\n";$message.=$_POST["comment"];$dummy=mail($email, $subject,
> $message); if($dummy) { echo "Thank you for your
comments.
> We have e-mailed you"; }?>
> The above script would accomlish what you want. If you want to dig for
your
> self go to
>
>
> http://ca.php.net/manual/en/function.mail.php
>
> HTH
> Frank
> ----- Original Message -----
> From: "dale" <dale(at)daleznet.com>
> To: "HWG Techniques" <hwg-techniques(at)hwg.org>
> Sent: Friday, November 22, 2002 4:29 PM
> Subject: Email form
>
>
> > Hi,
> >
> > I have this cute form on this page:
> >
> > www.imagineservices.net/bertform.html
> >
> > Looks nice, but it doesn't do anything yet! I want it to send an email
to
> > someone with the info in the fields and then redirect to a page that
says
> > thanks. What is an easy way to do this? I was thinking of PHP but all
my
> > books want to teach me a bunch of stuff I don't want to spend time
> learning
> > right now.
> >
> > Thanks!
> > dale
> >
>
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.