I keep getting an undefined index for vidid in my `$_POST when using multi dimensional array and I don’t know why I am getting this?
Below is jquery:
var videocounter = 0;
function stopVideoUpload(success, videoID, videofilename){
var result = '';
videocounter++;
if (success == 1){
result = '<span class="videomsg'+videocounter+'">The file was uploaded successfully</span>';
$('.hiddenvid').append('<input type="hidden" name="vidid[" + videocounter + "][]" id="'+videoID+'" value="' + videoID + '" />');
return true;
}
Below is the $_POST:
$vidresults = $_POST['vidid'];
Watch out for the quotes, f.ex this:
Should probably be
You can easily spot this in the syntax highlighting here at SO,