Hello.
I have just begun working on tying a Filemaker database to the web using PHP and the FX.php tool. I'm very new at all this stuff and am just getting my feet wet, but I have a question that is PHP related. If anyone has used this method to get their database hooked up, I would love some help.
So, here is the situation
Database of photos with keywords
When you search for a keyword, the search result is a 4 x "however many necessary" table. I currently have it working so it just shows the images in one long table row, each image it finds it just adds another <td>img</td> section.
Using a loop, how do i make it just write 4 <td>'s and then close the row and start again?
my code is as follows.
<?php
include ("FX/FX.php");
include ("FX/prefs.php");
$FX = new FX ($FMAddress, $FMPort);
$FX->SetDBData('phdb.fp5', 'Web', 'All');
$FX->AddDBParam('keywords', 'football', 'eq');
$FX-> AddSortParam ('Name', 'Ascend');
$search = $FX-> FMFind();
if ($search['foundCount'] > 0)
{
echo "<table width=100%>";
echo "<tr>";
foreach ($search['data'] as $key => $value)
{
echo "<td><img src="http://$FMAddress:$FMPort/".$value['Image'][0]."" /></td>";
}
echo "</tr>";
echo "</table>";
}
else
{
echo "There Are No Search Results";
}
?>
I'm not sure if I am explaining this well as I'm having a hard time getting my head around it, but if anyone has any ideas I would really appreciate it.
Thanks very much
Noah