Copy this code and paste it in your HTML
<?php
# | $Id$
require_once SITE_BASE . '/mime.php' ;
# | email headers
# | NEED TO EDIT THIS SECTION
$mail [ 'sender' ] = $_POST [ 'eMail' ] ;
$mail [ 'subject' ] = 'Interactive Marketing Tools' ;
$mail [ 'header' ] = sprintf ( "From: %s\n " , $mail [ 'sender' ] ) ;
$mail [ 'header' ] .= sprintf ( "Reply-To: %s" , $mail [ 'sender' ] ) ;
# | email field content
# | AND EDIT THIS BELOW
$mail [ 'fields' ] [ ] = array ( 'label' => 'First Name' , 'variable' => $_POST [ 'firstName' ] ) ;
$mail [ 'fields' ] [ ] = array ( 'label' => 'Last Name' , 'variable' => $_POST [ 'lastName' ] ) ;
$mail [ 'fields' ] [ ] = array ( 'label' => 'company' , 'variable' => $_POST [ 'company' ] ) ;
$mail [ 'fields' ] [ ] = array ( 'label' => 'address' , 'variable' => $_POST [ 'address' ] ) ;
$mail [ 'fields' ] [ ] = array ( 'label' => 'city' , 'variable' => $_POST [ 'city' ] ) ;
$mail [ 'fields' ] [ ] = array ( 'label' => 'state' , 'variable' => $_POST [ 'state' ] ) ;
$mail [ 'fields' ] [ ] = array ( 'label' => 'zip' , 'variable' => $_POST [ 'zip' ] ) ;
$mail [ 'fields' ] [ ] = array ( 'label' => 'phone' , 'variable' => $_POST [ 'phone' ] ) ;
$mail [ 'fields' ] [ ] = array ( 'label' => 'fax' , 'variable' => $_POST [ 'fax' ] ) ;
$mail [ 'fields' ] [ ] = array ( 'label' => 'eMail' , 'variable' => $_POST [ 'eMail' ] ) ;
$mail [ 'fields' ] [ ] = array ( 'label' => 'webURL' , 'variable' => $_POST [ 'webURL' ] ) ;
$mail [ 'fields' ] [ ] = array ( 'label' => 'howDid' , 'variable' => $_POST [ 'howDid' ] ) ;
$mail [ 'fields' ] [ ] = array ( 'label' => 'comments' , 'variable' => $_POST [ 'comments' ] ) ;
# | message formatting
# | NO NEED TO TOUCH BELOW HERE
$mail [ 'message' ] = "_____________________________________\n " ;
foreach ( $mail [ 'fields' ] as $field ) {
}
$mail [ 'message' ] .= "_____________________________________\n " ;
# | mail dispatch
mail ( $mail [ 'recipient' ] , $mail [ 'subject' ] , $mail [ 'message' ] , $mail [ 'header' ] ) ;
?>
According to php form tutorial when dealing with HTML forms and PHP it is necessary to remember that any form element in HTML page will automatically be available to the PHP scripts. I.E: