Re: Feedback form with mail function....

From: Date: Tue, 22 Apr 2003 19:08:15 +0000
Subject: Re: Feedback form with mail function....
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-144912@lists.php.net to get a copy of this message
----- Original Message ----- From: "Deependra b. Tandukar" <deepndra@icimod.org.np> To: <php-general@lists.php.net> Sent: Monday, April 21, 2003 11:35 PM Subject: [PHP] Feedback form with mail function.... First of reading this message, read the manual, read the faq and read the messages of this list for at least two weeks, so you might figure it how php is. > Dear all , > > I have a web form given below, processed by the PHP code which also given > below. Virtually it seems to me, it should work, but I never get any > feedback form, I have tried several times but no success. > > Anybody any idea? What do I need to do to make the code work... > > <html> > <form > action="http://www.icimod.org.np/publications/tpoints/tpointsE.php" > > method="POST" name="tpoints"> > <table> > <tr> > <td> > First Name > </td> > <td> > <input type="text" name="fname" size="20"> > </td> > </tr> > <tr> > <td> > Email > </td> > <td> > <input type="text" name="email" size="20"> > </td> > </tr> > </table> > </form> > </html> > > PHP > > <?php -------------------------------------------------------- > $msg = "$fname"; // This is wrong $msg=$_POST["fname"]; // Use instead -------------------------------------------------------- > $sendto = "dtandukar@icimod.org.np"; > $sub = "Feedback..."; > > $mailheaders = "From: My Site"; > $mailheaders .= "Reply-To: $email"; -------------------------------------------------------- Add at least the "\n" at the end of the line. If this doesn't work use "\r\n" instead. And read ftp://ftp.isi.edu/in-notes/rfc822.txt, then read ftp://ftp.isi.edu/in-notes/rfc2045.txt. -------------------------------------------------------- > > mail($sendto,$sub,$msg, $mailheaders); > ?> > > Best regards, > DT > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > Mario Soto mario_s@amigo.net.gt -.-.-.-

« previous php.general (#144912) next »