Link to home
Start Free TrialLog in
Avatar of bundles35
bundles35

asked on

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.
Avatar of Eddie Shipman
Eddie Shipman
Flag of United States of America image

How are you accessing the file, using the FileMaker for PHP API or ODBC?
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
Avatar of bundles35
bundles35

ASKER

I am connecting to the PHP API.
Can you show some code, please? Also, does your FM have a layout?
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
Looks like these are the fields it is querying:
    $fields = array(
                     'Code' => 'Code',
                     'links_url' => 'links_url'
    );

Open in new window


See report.php
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?
ASKER CERTIFIED SOLUTION
Avatar of Eddie Shipman
Eddie Shipman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I believe acceptance of comment https:#a38756898 would be prevalent here.