postonoh Posted April 21, 2011 Share Posted April 21, 2011 Html code <div id="feedback"> <p class="error wrong_name"> Fill the correct name</p> <p class="error wrong_email"> Incorrect email</p> <p class="error wrong_message"> Enter your message</p> </div> <form action="sendemail.php" id="contact_us" method="post"> <p class="label_name">Name</p> <p class="input_form"> <input type="text" name="Name" width="20"/> </p> <p class="label_name">Email</p> <p class="input_form"> <input type="text" name="Email" /> </p> <p class="label_name">Message</p> <p class="input_form" id="textarea"> <textarea name="Message" rows="5" cols="4" id="message_input"></textarea> </p> <p id="submit"> <input type="submit" value="Send" name="submitButton" class="button" /> </p> </form> <p id="success">Your message was sent succesfully!</p> Php code <?php $mailTo = '[email protected]'; $name = htmlspecialchars($_POST['Name']); $mailFrom = htmlspecialchars($_POST['Email']); $subject = 'Information Request'; $message_text = htmlspecialchars($_POST['Message']); $message = 'From: '.$name.'; Email: '.$mailFrom.' ; Message: '.$message_text; mail($mailTo, $subject, $message); ?> this works real simple I would like to add a auto respond to the person click the submit button. Quote Link to comment https://forums.phpfreaks.com/topic/234389-php-auto-responder/ Share on other sites More sharing options...
mens Posted April 22, 2011 Share Posted April 22, 2011 1. Please obscure or remove your email address. 2. Google, and learn. Quote Link to comment https://forums.phpfreaks.com/topic/234389-php-auto-responder/#findComment-1204697 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.