Re: mail
| From: | Jason Wong | Date: | Thu, 09 May 2002 15:47:56 +0000 |
| Subject: | Re: mail | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-19082@lists.php.net to get a copy of this message | ||
On Thursday 09 May 2002 22:44, Natividad Castro wrote:
> Hi to all,
> how do I call an email script in a form?
> I have a form that after has been submitted will store the following field
> into a table project
> project_name
> project_desc
> project_loc
>
> at the same time I want to send an email to the webmaster. I know how to
> create the script to send email, but I don't know how to call it when the
> form is submitted.
> for example
>
> <form action="file.php" method="post">
^^^^^^^^
That is the file which will be called when the form is submitted. Thus in
that file you would have your code for inserting the info into the db, and
you would have the following code to send your mail.
> this is what I have so far
> if ($REQUEST_METHOD == "POST") {
>
> $realname = strip_tags($realname);
> $email = strip_tags($email);
> $feedback = strip_tags($feedback);
> $who = "$whoname";
> $sendto = "$email";
> $subject = "Work to be verfied";
> $message = "$realname, $feedback";
> mail($sendto, $subject, $message, "From:".$who);
>
> }
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
I gave up Smoking, Drinking and Sex. It was the most
*__________horrifying* 20
minutes of my life!
*/