I have a page that loads in "get-results.php" which loads the results into a div. This works great. However, I also need to grab a variable from the php file that is being loaded, so that I can re-include it in the .load() url, this way I can have the php file have the previous result for comparison.
$(".results").load("get-results.php" + "?userClicked=" + var1 + var2 + "&prevresult=" + theResults);
In the "get-results.php" file, I have set
var theResults = "<?php echo $result; ?>";
Is there a way for me to access "var theResults" from the page that is loading it (outer page, not inner)? How can I get the Var from the file and put it into a Var in the outer file? Any pointers would be great thanks.