I have this HTML:
<form action='uploadhandle.php' method='POST' enctype="multipart/form-data">
<input type='file' class='fileinput' id='photo1' name='photo1'>
<input type='button' id='upload1' name='upload1' value='Upload'>
</form>
My jquery code is:
$('#upload1').click(function(){
$.ajax({
url: "uploadhandle.php",
data: 'photo1='+photo1,
success: function(data){$('#result_div').html(data)}
});
In my uploadhandle.php, when I try to display the $_POST['photo1'], nothing comes up, it's "undefined". Does anyone know what I did wrong?
Thanks a lot, Regards