Solved

Filemaker PHP webpage

Posted on 2013-01-08
11
18 Views
Last Modified: 2016-06-30
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
Comment
Question by:bundles35
  • 6
  • 3
11 Comments
 
LVL 26

Expert Comment

by:EddieShipman
ID: 38755064
How are you accessing the file, using the FileMaker for PHP API or ODBC?
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 38755070
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
 

Author Comment

by:bundles35
ID: 38755078
I am connecting to the PHP API.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 26

Expert Comment

by:EddieShipman
ID: 38755096
Can you show some code, please? Also, does your FM have a layout?
0
 

Author Comment

by:bundles35
ID: 38755285
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
 
LVL 26

Expert Comment

by:EddieShipman
ID: 38755888
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
 

Author Comment

by:bundles35
ID: 38756346
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
 
LVL 26

Accepted Solution

by:
EddieShipman earned 500 total points
ID: 38756898
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
 
LVL 26

Expert Comment

by:EddieShipman
ID: 41684007
I believe acceptance of comment https:#a38756898 would be prevalent here.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question