Jump 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.

Embedding FM data as URL using FX

Featured Replies

This was posted originally in PHP but this section seems to get more traffic. So here goes...

I am trying to add a php query to filemaker as a section on my training page.

The database contains a list of movie urls and titles.

I have successfully generated the list by modifiying the index.php that is included with the FX installation.

My problem is that when trying to make the Title into a clickable Link I am getting the following parse error.

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /Library/WebServer/Documents/FX/index1.php on line 86

here is line 86

code

echo "<a href=" . urlencode($value['URL'][0]) . "">";

echo $value['URL'][0];

echo "</a></td>n";

For clarity, I will add the code that does work (returns a list of movie urls but without the correct href

code

echo "<a href="detail.php?ID=$recordID&query=" . urlencode($currentSearch) . "">";

echo $value['URL'][0];

If anyone can shed some light on how I can make the data from the URL field in FileMaker be the href in the link I would be most appreciative.

thanks

John

FileMaker Version: 6

Platform: Mac OS X Panther

John,

I have (what I expect is) a similar database that I use for posting some RSS feeds to my intranet users. I noted that the use of "urlencode()" causes the base URL from my web server to be pre-pended to the URL I actually want to output. The result was that my URL was something like:

http://myintranet.server.com/http://mytarget.web.site.com?vars=x....

as opposed to:

http://mytarget.web.site.com?vars=x....

My working code snippet looks like:

- - - - - - - - - - - - - - - - - - -

$query = new FX($FMAddress, $FMPort);

$query->SetDBData ('News.fp5', 'web');

$result = $query->FMFindAll();

foreach ($result['data'] as $key=>$dataArray) {

echo "<a href="" . $dataArray['URL'][0] . "">n";

echo $dataArray['URL'][0] . "<br>n";

echo "</a>n";

}

- - - - - - - - - - - - - - - - - - -

Hope this helps in some way.

regards...

Bob Minteer

FileMaker Version: Dev 6

Platform: Windows XP

  • Author

Bob,

Worked like a charm. Thankyou so much for your help!

Create an account or sign in to comment

Important Information

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

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.