I have a PHP file that handles sending out confirmation emails. I also have a calendar that I use AJAX to do various updates. When AJAX calls the update file, it updates the
You can handle the variables within your included script, rather than appending them onto the include path itself:
$var = "foo";
include("script.php");
-- contents of script.php --
echo $var; // 'foo'
In my opinion this is much cleaner anyway. You may desire to check to make sure the values exist within script.php
before echoing out any variables.