How can add php file for form submit in this code? where should i add php file link in below code?
<!doctype html> <html> <head> <meta charset="utf-8"> </head> <body> <section id="contact"> <div id="form_div"> <div class="content"> <div id="form"> <form action="./php/contact_mail_temp.php" id="contactForm" method="post"> <span>Name</span> <input type="text" name="name" class="name" placeholder="Enter your name" tabindex=1 /> <span>Email</span> <input type="text" name="email" class="email" placeholder="Enter your email" tabindex=2 /> <span id="captcha"></span> <input type="text" name="captcha" class="captcha" maxlength="4" size="4" placeholder="Enter captcha code" tabindex=3 /> <span>Message</span> <textarea class="message" placeholder="Enter your message" tabindex=4></textarea> <input type="submit" name="submit" value="Send e-mail" class="submit" tabindex=5> </form> </div> </div> </div> </section> <script> function captchaCode() { var Numb1, Numb2, Numb3, Numb4, Code; Numb1 = (Math.ceil(Math.random() * 10)-1).toString(); Numb2 = (Math.ceil(Math.random() * 10)-1).toString(); Numb3 = (Math.ceil(Math.random() * 10)-1).toString(); Numb4 = (Math.ceil(Math.random() * 10)-1).toString(); Code = Numb1 + Numb2 + Numb3 + Numb4; $("#captcha span").remove(); $("#captcha input").remove(); $("#captcha").append("<span id='code'>" + Code + "</span><input type='button' onclick='captchaCode();'>"); } $(function() { captchaCode(); $('#contactForm').submit(function(){ var captchaVal = $("#code").text(); var captchaCode = $(".captcha").val(); if (captchaVal == captchaCode) { $(".captcha").css({ "color" : "#609D29" }); } else { $(".captcha").css({ "color" : "#CE3B46" }); } var emailFilter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,10})+$/; var emailText = $(".email").val(); if (emailFilter.test(emailText)) { $(".email