Garry Claridge Posted March 18, 2004 Share Posted March 18, 2004 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 Link to comment Share on other sites More sharing options...
Steve T. Posted March 21, 2004 Share Posted March 21, 2004 Hi, Garry! As I am just starting to get my FileMaker feet PHP wet, I appreciate this very, very much. Cheers! --ST Link to comment Share on other sites More sharing options...
Garry Claridge Posted March 26, 2004 Author Share Posted March 26, 2004 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 Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 7334 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now