I have a PHP file where when checked boxes are checked and a button is clicked a js file is called that has the following code
$.ajax ({
type: "POST",
url: "decisionExec.php",
dataType: "json",
data:({cnt:cnt,amGuide:guides.amGuide,folGuide:guides.folGuide,tichGuide:guides.tichGuide,nebGuide:guides.nebGuide,sterGuide:guides.sterGuide,ingGuide: guides.ingGuide }),
success: function(data) {
$("#message").html(data.message);//"Generating the files for the BookScouter results. An email will be sent when this is completed."
$("#start2").html(data.start);
} // end of success
}); // end of ajax
this code works fine and sends the correct data to my php file by using POST
$amG = $_POST['amGuide'];
$folG = $_POST['folGuide'];
$tichG = $_POST['tichGuide'];
$nebG = $_POST['nebGuide'];
$sterG = $_POST['sterGuide'];
$ingG = $_POST['ingGuide'];
The problem I am having is that this takes too long so i want to use a passthru file as i do in other areas but cant figure out how to "passthru" the values this is my passthru php file.
<?php
passthru('php /decision.php >> /web/webInv.txt &');
$now = date("m/d/y h:i:s");
$message = array('message' => 'An email will be sent when it is finished.',
'start' => 'Started at approx. ' . $now);
echo json_encode($message);
?>
any thoughts on how i can do this (this file takes about 30 minutes to process and email)