RE: [PHP-DB] mail

From: Date: Thu, 09 May 2002 16:09:46 +0000
Subject: RE: [PHP-DB] mail
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-19083@lists.php.net to get a copy of this message
it works!!! Thank you very much -----Original Message----- From: Jason Wong [mailto:phplist@gremlins.com.hk] Sent: Thursday, May 09, 2002 11:48 AM To: php-db@lists.php.net Subject: Re: [PHP-DB] mail 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! */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#19083) next »