This works put this above <HTML> tags at top of your code page. <?php // convert your form variables to PHP variables to work with them. $first_name = $_POST['user_first_name']; $last_name = $_POST['user_last_name']; $email = $_POST['user_email']; $comments = $_POST['comments']; // Mail section $to = 'contact@yoursite.com' ; $subject = 'They contacted us!' ; $message = $comments; $headers = 'From: ' . "\r\n" . 'Reply-To:' . ' ' . $_POST['user_email'] . "\r\n" . 'X-Mailer: PHP/' . phpversion(); // check to see the form was filled out (also use some other validator would be good) // It'll only send you mail if the user first name was entered. if($_POST['user_first_name'] != NULL) { $ok2 = mail($to, $subject, $message, $headers); ?> <HTML> <HEAD> etc etc ... -------------- form section ---------------- <form name="whatever" method="post" action="name-of-this-page-you-make.php"> First Name <input type="text" name="user_first_name" maxlength="50" size="30"><br> Last Name <input type="text" name="user_last_name" maxlength="50" size="30"><br> email <input type="text" name="user_email" maxlength="50" size="30"><br> <textarea name="comments" cols="30" rows="10" class="html-text-box">Enter your comments here...</textarea><br><br> <input type="submit" value="submit this form" onchange="this.form.submit"> </form> The form is real basic, validate it more, clean it up for how it sits on your page ,blah blah but thats as good as it gets for FREE buy your printing from ezprintsolutions.com in exchange
thankyou everyone it now works but yes it is in my junk folder anyone know how to get it in the main folder
update onclick="this.form.submit" my bad <select> menu was in my mind when i wrote that. and close that if(statement) on the $ok2 }