Form to mail
       | 
    
| form.html | 
| <FORM ACTION="formtomail.php"
METHOD=post> 
             <!-- Your fields here --> <INPUT TYPE=submit value="Submit">   | 
          
| formtomail.php | 
| <? if ($_POST){ // posted information is added to variable message $message=""; foreach ($_POST as $formfieldname => $formfieldvalue){ $message.="$formfieldname \n $formfieldvalue\n\n"; // } // send email with information from the form to mail("webmaster@mysite.com","Form to Mail", $message,"From: <webmaster@mysite.com>\nContent-Type: text/plain"); print "The information has been send to webmaster"; }else{ print "No information has been posted"; } ?>  |