I have the following:
var model='ABCD';
var from = '4/12/2016';
var to ='4/12/2017';
var line= 'A';
window.location = "data/export.php?model="+model+"&from="+from+"&to="+to+"&line="+line;
now I am trying to access these variables in export.PHP so I can use them in a query. Is that possible? I have been looking around and reading but it looks like it isn't?
I have tried doing:
$fromDate = $_GET['from '];
$toDate = $_GET['to'];
$line= $_GET['line'];
...
I think this doesn't work because it is not sending them in GET but is there a way to access those in PHP?
I understand I could use ajax but there is a limitation because of a library that I am using that won't work with ajax calls so there was the suggestion to use window. location=URL is there something similar to this method that would allow me to access the variables from JS to PHP and then work with a spout download xlsx file?
I am really new to programming so I apologize if this is obvious.