$getID = mysql_query("SELECT MAX(id) AS id FROM bulkMail"); $id = mysql_result($getID,0,0); //execute distribution script exec("php /www/htdocs/newsletter/distribution.php $id > /dev/null &");
this allows the user to go about their life while the script in "distribution.php" runs the e-mail program and sends the message w/ the id of $id.
On the distribution.php page, this $id is passed in array $_SERVER['argv'];
The id IS BEING PASSED, if I use the script and have it output the passed variable, it shows it to me. The problem is when I do this:
$getMessage = mysql_query("SELECT * FROM bulkMail WHERE id='$id'");The script wont work.
if I overwrite $id to an integer of a known table row ($id=5;) the script works.
but if I use the passed variable ($id= $_SERVER['argv']) it doesn't work.
What am I missing? I'm pulling my hair out trying to figure this out. ???