March 18, 200421 yr Here is a php script which accepts CDML URL arguments and passes them to FM. <?php if ($_SERVER["QUERY_STRING"] != "") { include("http://10.0.1.107:591/FMPro?" . $_SERVER["QUERY_STRING"]); } else { echo "POST method is not yet implemented"; }; ?> This can be called by a URL like this: http://mywebserver/fmpro?-db=mydb.fp5&-format=mypage.html&-findall The line: include("http://10.0.1.107:591/FMPro?" . $_SERVER["QUERY_STRING"]); is talking to FM on a LAN. It could also be on the same host with: include("http://localhost:591/FMPro?" . $_SERVER["QUERY_STRING"]); This part: " . $_SERVER["QUERY_STRING"] adds the agument list to the new URL. Hope this is of interest. Garry
March 21, 200421 yr Hi, Garry! As I am just starting to get my FileMaker feet PHP wet, I appreciate this very, very much. Cheers! --ST
March 26, 200421 yr Author Here is a version of the "PHP Filter" which processes Forms: <?php if ($_SERVER["QUERY_STRING"] != "") { @include("http://localhost:591/FMPro?" . $_SERVER["QUERY_STRING"]); } else { $args = ""; while ($fm_params = Current($_REQUEST)) { $args .= urlencode(key($_REQUEST)) . "=" . urlencode($fm_params) . "&"; next($_REQUEST); }; @include("http://localhost:591/FMPro?" . $args); }; ?> You could use a Form like this: <body> Hello World<br> <form action="fmpro.php" method="POST"> <input type="hidden" name="-db" value="combotest.fp5"> <input type="hidden" name="-format" value="-fmp_xml"> <input type="submit" name="-new" value="New Rec"> </form></body> Good Luck. Garry
Create an account or sign in to comment