e-mail form

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Vietboy
Forum Commoner
Posts: 41
Joined: Mon Dec 01, 2003 10:59 pm

e-mail form

Post by Vietboy »

Code: Select all

<?php
mail("email", "E-mail Form", $message,
     "From: admin@{$_SERVER['SERVER_NAME']}\r\n"
    ."Reply-To: admin@{$_SERVER['SERVER_NAME']}\r\n"
    ."X-Mailer: PHP/" . phpversion());
?> 

How do I send an e-mail to the person that put their e-mail in a field box?

<input text="email" size="30" maxlength="255">
?>
[/php_man]
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Make that word "email" into a GET or POST variable. $email for example.

And then within a form using the GET or POST method, send that variable within a textfield.

Reference page: [php_man]mail[/php_man]()
Post Reply