Solved

Filemaker PHP webpage

Posted on 2013-01-08
11
14 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
 
LVL 26

Expert Comment

by:EddieShipman
ID: 38755096
Can you show some code, please? Also, does your FM have a layout?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

930 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now