September 26, 201312 yr Does anyone know how to send the form information from this contact form to an email address once it's passed validation? Form <?php include("livevalidationphp.class.php"); // the LiveValidationPHP scripts include("rules.inc.php"); // hold the rules $html=""; $frmTestLive=new LiveValidationMassValidatePHP("frmTestLive",$_POST); $frmTestLive->addRules($formRules["frmTestLive"]); $html=$frmTestLive->generateAll(); // check for a post action $frmTestErrors=array(); if(isSet($_POST["action"])) { if($_POST["action"]=="send_test_form") { $frmTestErrors=$frmTestLive->validate(); } } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> </head> <body> <?php if(count($frmTestErrors)>0) { print "<strong>You have errors:</strong>"; print "<pre>"; print_r($frmTestErrors); print "</pre>"; } ?> <form name='frmTest' id='frmTest' action='' method='post'> <input type='hidden' name='action' value='send_test_form'> <input type='text' name='element_1' id='element_1' value='' placeholder='Name'> <input type='text' name='element_2' id='element_2' value='' placeholder='Email'> <input type='text' name='element_3' id='element_3' value='' placeholder='Message'> <input type='submit' value='go'> </form> </body> </html> Validaton etc... http://pastebin.com/raw.php?i=24vA5RZh Can't seem to find how to send the information to an email once the forms valid? Anyone have any ideas?
September 26, 201312 yr agree with Meh. This is asked about once a week so shows people are not searching for the answers. But here this will help you http://www.w3schools.com/php/php_mail.asp
October 1, 201312 yr agree with Meh. This is asked about once a week so shows people are not searching for the answers. But here this will help you http://www.w3schools.com/php/php_mail.asp This one should be good. Just use mail() function, everything is described in the above link. Good luck!
October 3, 201312 yr The page linked to above is not the best tutorial for this. try the following site. http://www.html-form-guide.com/ The methods employed in sending form data is explained much more clearly and contains many fully functioning examples
Create an account or sign in to comment