Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 36
  • 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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