If I have the below code in an external JavaScript file; if the PHP file I'm calling is located in the same directory, do I have to add "../directory/filename.php"? The php script is not running, and I've posted the script in full in another thread, but I think It may be related to the "URL" in my $.ajax call.
$.ajax({
type: 'POST',
url: '../script/mail.php',
data: {fname:firstName, lname:lastName, email:emailVal, comment:comments, fileName:fileName},
success: function(){
$('form').each(function() {
this.reset();
});
}
});
Previous Question: PHP Mailer script not completing after ajax call and form submit