| From: | Natividad Castro | Date: | Thu, 09 May 2002 14:44:57 +0000 |
| Subject: | |||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-19080@lists.php.net to get a copy of this message | ||
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">
<input type="text" name="field1">
<input type="submit" value="post">
</form>
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);
}
can anybody help me
Thanks in advanced
Nato