Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Basic PHP/FM Interaction

Featured Replies

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

Hi, Garry! As I am just starting to get my FileMaker feet PHP wet, I appreciate this very, very much. Cheers!

--ST

  • 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

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.