Page 1 of 1

e-mail form

Posted: Thu Dec 18, 2003 12:56 am
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]

Posted: Thu Dec 18, 2003 2:17 am
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]()