i have form in which i want three functionality among two is working. First one is when form gets submit fetch data from db and display on form_process.php file and second is store form data in db on submit, this two is working fine in form_process.php. Now i want to send all form data via email so i want to do process in email_process.php. So how should i call email_process.php ?
i am already using form action for form_process.php
<form class="cost_calculation" action="form_process.php" name="cost_estimation" id="cost_estimation" method="post">
submit button:
<div class="get_quote_btn">
<input class="get_quote" name="submit" id="getquote" type="submit" value="Get Quote" />
</div>
I tried using ajax but it's not working
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("input").click(function(){
$.ajax({url: "email_process.php", success: function(result){
$("#cost_estimation").html(result);
}});
});
});
</script>
Thanks in advance.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…