I'm sending users to a new link which has a value that is encoded with Javascript's btoa, however, on the PHP side, when I decode it and echo the value out, the value that is echoed out is "undefined"
$("#btn-print-bonus").click(function(){
var id = btoa(id);
window.open('/pdf/?type=bonus&id='+id+'&name='+fullname+'');
});
php file
$id = base64_decode($_GET["id"]);
echo $id;
fullnameandidcome from? If you open the browser developer tools and set a breakpoint on the click handler, you might be able to see what the argument to window.open will be.undefinedkeyword by itself because it has no special meaning in the language. I'm pretty sure you have a literalundefinedencoded in Base64.