[FX.php List] Running a FM script in FM 7 Server Adv ?
Ankur Goyal
goyal at biodiversity.unr.edu
Mon Jan 23 15:04:04 MST 2006
Thanks for your help, I think, I got a working prototype with
PHP.....:) it works fine also I can mark whether the email has been
sent or not !
A quick question: Is there a way to make this PHP code run
automatically, without clicking anywhere on any web page ?
Thanks !
Ankur
On Jan 23, 2006, at 11:22 AM, Derrick Fogle wrote:
>>>
>>> if($searchData2['Day1'][0]<7)) {
>>> $mailresult = mail($to, $subject, $message, $headers);
>>> }
>
> Once you've got your logic worked out to identify those records
> that need emailed, you can use PHP to update the files to mark that
> the email was sent:
>
> if($mailresult) {
> # send mail was successful
>
> $q3 = new FX( '****', '80' );
> $q3->SetDBData('Test.fp7','Test','all');
> $q3->SetDBPassword('***','Admin');
> $q3->AddDBParam('Eflag1','2');
> $q3->AddDBParam('-recid',$recid);
> $r3 = $q3->FMEdit();
> }
>
> Get the recid by exploding the $key value in the foreach loop and
> taking the first value; I think examples are in the sample files,
> here's what I usually do:
>
> $keyParts = explode(".",$key);
> $recid = $keyParts[0];
>
>
> Derrick Fogle
> derrick at fogles.net
>
>
>
More information about the FX.php_List
mailing list