Is there a “best practice” in passing variables from Ajax to a PHP file?
$constant = “This is my global constant I want accessible in all files.”;
// ajax script
url = "extfile.php";
req.open("GET", url, true);
This will work using sessions or if I pass $constant through the URL, but as I’m new to Ajax I’m wondering if there’s a better, more appropriate way of handling this. Thanks.