I cant figure out how i have to put the strings in this variable to let it work.
$button_uploader = '<button class="uploader_button" onclick="location.href='uploader.php' type="button">Upload hier je antwoorden</button>';
I cant figure out how i have to put the strings in this variable to let it work.
$button_uploader = '<button class="uploader_button" onclick="location.href='uploader.php' type="button">Upload hier je antwoorden</button>';
If you realy want to do that, use antislash character. Ex : \'upload.php\'
But I suggest to you to not insert your javascript here and create separed file.
Look at something like that :
php/html, add id attribute to your button :
$button_uploader = '<button id="my_uploader_button" class="uploader_button" type="button">Upload hier je antwoorden</button>';
js :
var my_uploader_button = document.getElementById('my_uploader_button');
my_uploader_button.addEventListener('click', function() {
window.location.href='uploader.php';
});