• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 27
  • Last Modified:

Filemaker PHP webpage

I was looking into the following scenario:
I have a table in filemaker that contains two fields I would like to utilize in a webpage written in PHP.  They are "code" and "URL"

The webpage starts with a form has an input field asking for the code (6 digit unique code) and when submitted, the page will redirect to the corresponding URL field in the table.

My guess is that a search would happen and the success page could use a PHP redirect using  headers.

Any help would be greatly appreciated.  I have created the initial files for the database configuration and I can connect to the database successfully.
0
bundles35
Asked:
bundles35
  • 6
  • 3
1 Solution
 
Eddie ShipmanAll-around developerCommented:
How are you accessing the file, using the FileMaker for PHP API or ODBC?
0
 
Eddie ShipmanAll-around developerCommented:
I found this document that has some PHP code showing how to show FM data using PHP:
http://www.filemaker.com/downloads/pdf/article1_php.pdf
0
 
bundles35Author Commented:
I am connecting to the PHP API.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Eddie ShipmanAll-around developerCommented:
Can you show some code, please? Also, does your FM have a layout?
0
 
bundles35Author Commented:
I used the PHP site assistant that came along with FM Server to get started with the files. I don't have any customization to the code written yet.  Either way, I have attached the zip folder containing them.  This is a basic set of file that will allow a search on either of the two fields and give me a report on the results.
view.zip
0
 
Eddie ShipmanAll-around developerCommented:
Looks like these are the fields it is querying:
    $fields = array(
                     'Code' => 'Code',
                     'links_url' => 'links_url'
    );

Open in new window


See report.php
0
 
bundles35Author Commented:
I would need the value of the links_url field to work within this, rather than display on the report:
header("Location: $field;

Is that possible?
0
 
Eddie ShipmanAll-around developerCommented:
This is how I see to get the field value from the code in the printReport() function and the PDF I posted the link to.
$field = $layout->getField($fieldName);
$field = htmlspecialchars($field, ENT_QUOTES);
$field = nl2br($field);

Open in new window

0
 
Eddie ShipmanAll-around developerCommented:
I believe acceptance of comment https:#a38756898 would be prevalent here.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 6
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now