Jump to content

Embedding FM data as URL using FX


This topic is 6502 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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


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


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.



FileMaker Version: 6

Platform: Mac OS X Panther

Link to comment
Share on other sites


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:


as opposed to:


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.


Bob Minteer

FileMaker Version: Dev 6

Platform: Windows XP

Link to comment
Share on other sites

This topic is 6502 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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

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