Solved

Filemaker PHP webpage

Posted on 2013-01-08
11
20 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: 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!

 
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

Industry Leaders: 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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PHP Mail error 3 43
MySQL Persistent Connections 10 32
while read ID; do 4 54
restriction of entering a a page 5 31
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
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…
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.

761 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