I'm trying to make a multiple photo upload, but it doesn't. I used the input between <p></p>
and now I made an ECHO in PHP with a table and put the input in a <tr><td>
. I change the code in jQuery but it doesn't work anymore. Can someone help me?
This is the code:
jQuery:
$(document).ready(function(){
$('#add_more').click(function(){
var current_count = $('input[type="file"]').length;
var next_count = current_count + 1;
$('#file_upload').prepend('<tr><td colspan="1">Fotka : </td><td colspan="2"><input type="file" name="file_' + next_count + '" /></td></tr>');
});
});
And this is the PHP. I had to make ECHO because I'm making an administration and I'm using parameters.
echo ' <tr><td colspan="1">Fotka : </td><td colspan="2"><input type="file" name="file_1"></td></tr>
No problem with PHP. Don't pay attention to the quotes. I closed them in another line. Thanks