I need to send mail before sending my php page, I send the page using javascript. my mail script is in the sendmails.php file. so can i send an ajax request to send mail before sending the page using java script? well
function submit_page()
{
..............................
............................
xmlhttp.open("GET","send_mail.php",true);
xmlhttp.send();
.................................
if(a)
form.action = 'one.php'
else
form.action = 'two.php'
form.submit()
}
Will send_mail.php be launched on the server?
thank
source
share