Jquery function (it is working):
del_selected.on('click', function(e){
box.filter(':checked').each(function(){
selektovane_slike.push($(this).val());
$(this).parent().slideUp('fast');
});
data = JSON.stringify(box.serialize(), null, 2);
console.log(data);
$.post(del_url, data, function(){
}, JSON);
e.preventDefault();
});
This function gives this result:
"slike=apples.jpg&slike=50BestBandLogos.jpg&slike=Great-Logos-200x200.jpg"
And in PHP we have this:
function ypg_delete_img_selected()
{
print_r($_POST);
}
Response which I get is:
Disallowed Key Characters.
What is the problem?
HTML:
<div class="zuta_strana_trenutne_slike">
<p>All Images</p>
<?php $imgs = explode(',', $zts['image']);
foreach($imgs as $img) : ?>
<div class="zuta_strana_izmena_slika">
<img src="<?php echo IMG ?>zute_strane/thumbs/<?php echo $img ?>" title="<?php echo $zts['name'] ?>" />
<input type="checkbox" name="slike" value="<?php echo $img ?>" />
<a href="<?php echo base_url() ?>zute_strane/ypg_delete_img/<?php echo $img . '/' . $zts['id_global_info'] ?>" title="<?php echo $img ?>">Obriši Sliku</a>
</div>
<?php endforeach; ?>
<a class="zute_strane_izmena_selektuj_sve">Select All</a>
<a href="<?php echo base_url() ?>zute_strane/ypg_delete_img_selected/<?php echo $zts['id_global_info'] ?>" class="zute_strane_izmena_obrisi_sve">Delete Selected</a>
</div>