I need to access a JavaScript variable with PHP. Here\'s a stripped-down version of the code I\'m currently trying, which isn\'t working:>
JS ist browser-based, PHP is server-based. You have to generate some browser-based request/signal to get the data from the JS into the PHP. Take a look into Ajax.