I have a client who uses a FM system for his business. He now wants to connect it to a web shop, so that if somebody orders something online, the site executes a PHP script that sends the info to FM where it is processed further. Problem is that I am familiar with FM, but not with PHP, while the website designer is familiar with PHP, but not with FM.
We have a script in FM called NewWebOrderLine.
He is able to execute that script when there is a new web order. That part works.
But, the idea is that all details (name, address, etc.) are sent as a list of script parameters, so that the NewWebOrderLine script can get each item from the list and set the right field in FM to that value. However, the web guy is struggling how to send a list of script parameters in PHP.
We checked page 70 of the FM14 PHP manual, and it simply says "specifying the layout, script name, and any script parameters”.
What we need to know is in what format the web guy should add the script parameters in PHP so that they 'arrive' in FM.
I was hoping that someone could give me a simple example of what this should look like in PHP so that I can forward this to him.
Below the text in the FM PHP manual.
Any help is appreciated,
Running a FileMaker script
Use the newPerformScriptCommand() method to create a FileMaker_Command_PerformScript object, specifying the layout, script name, and any script parameters. Then, perform the script by calling the execute() method.
$newPerformScript = $fm->newPerformScriptCommand('Order Summary', 'ComputeTotal');
$result = $newPerformScript->execute();