This is the main part of the JavaScript file.
$(document).ready(function()
{
$('form').submit(function(event)
{
var formData = {
'name' : $('input[name=name]').val(),
'position' : $('input[name=position]').val(),
'resume' : $('input[name=resume]').val(),
'comment' : $('#commentBox').val()
};
$.ajax({
type : 'POST',
url : 'process.php',
data : formData,
dataType : 'json',
encode : true
})
It gets HTML form fields and posts them to the PHP file.
I then access all the fields via $_POST['..']
Problem is the 'resume' field only passes on a String like : "C:/fakepath/file.doc" but I need to pass on the actual object/file so I could access it with $_FILES['resume']['name'] in the PHP file.
I'm sure there is something simple I'm missing but I've stared at it far too long and Googled examples without much success.
Appreciate any assistance, criticism :)