Hi. i have this code :
<input name="userfile" onchange="loadPlayerPhoto('1')" type="file" value="fotog">
function loadPlayerPhoto(photoid) {
$.ajax({
type: 'POST',
cache: false,
url: './auth/ajax.php',
data: 'idp='+escape(photoid)+'&id=loadplayerphoto',
success: function(msg) {
$('#ppid'+photoid).html(msg);
}
});
return false;
}
when a user select the photo, it call that function. I need to send the photo via ajax. How can send it to the server?