0

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

10th May 2017, 9:03 PM
Ritesh Kumar
Ritesh Kumar - avatar
4 Respuestas
+ 1
<!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
11th May 2019, 9:45 PM
محمد عبدالله ابوعمود
محمد عبدالله ابوعمود - avatar
0
you can use form method post action your_code.php or use a jQuery call back function 😀
10th May 2017, 9:27 PM
⏩▶Clau◀⏪
⏩▶Clau◀⏪ - avatar
0
no
26th Apr 2019, 1:24 PM
Santiago Grosso
0
tak tau
12th Aug 2020, 12:25 PM
Waliuddin Mohd Nazrin
Waliuddin Mohd Nazrin - avatar