thebloke Posted April 2, 2004 Posted April 2, 2004 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
Bob Minteer Posted April 4, 2004 Posted April 4, 2004 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
thebloke Posted April 5, 2004 Author Posted April 5, 2004 Bob, Worked like a charm. Thankyou so much for your help!
Recommended Posts
This topic is 7529 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