Jump to content

Get records from a fm-database to a website


This topic is 6674 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hey everyone,

I'm a new member here, and I'm from Belgium, so sorry for the spelling-errors!

I am a student, and would like to make dynamic webpages using html, php and filemaker!

I have a hosting, on an Apple Xserve, with filemaker server installed, and I use filemaker pro 7...

I already made a webpage, www.deform.be, with a contact-form, and this information is send to a filemaker database.

But now I want to make a 'comments'-page (some kind of guestbook) , and then I need something like this:

-You fill in a form on my site

-The fields are sent to an fm-database (so far, so good)

-Then you get redirected to de start-site of the guestbook

-And your comment is already there

So what I need to know now is how I can read out fields of a layout in my filemaker database, to a website, using nothing but php!

I would like to do it with only php (and html of course), not with cafephp of so...

I hope you understand my question, and already thx a lot!

Greetz from Belgium!

Link to comment
Share on other sites

  • Newbies

Hi Garry,

Thanks for your answer!

But on the server is FM server!

But isn't there a way to read the fields out of de FM database with juist the php code? If writing is so simple, reading must also be possible!

Link to comment
Share on other sites

Unless you have FM Server Advanced, both Writing and Reading access, directly by PHP, would not be possible (that I know of). Unless, you can emulate the Instant Web Publishing (IWP) GET/POST commands.

That is why you may need to use AppleScript or ODBC to talk with PHP for access.

All the best.

Garry

Link to comment
Share on other sites

  • Newbies

But I have read and write access...

It is my own .fp7 file, on a server running fm server advanced!

I can read, write and delete as I please...

I just nead the php-code to read the data in de fm-database...

Link to comment
Share on other sites

Here is a typical URL to access data from FM Server Advanced:

http://server.company.com/fmi/xml/fmresultset.xml?-db=products&-lay=sales&-findall

It will return the result as XML data. Hence, you will need to handle that with PHP. Here is a PHP function for getting data:

$mydata = file_get_contents( the url );

echo $mydata

To write to the database you would use the "-new" or "-edit" actions in the URL.

The Guide for this is, "fmsa7_custom_web_guide.pdf". You may be able to find it on the FM web-site.

Good Luck.

Garry

Link to comment
Share on other sites

  • Newbies

Ok so I have to acces my database with


$FM = new FM_and_PHP();

$FM->setFileMakerHost(");

$FM->setDatabaseName("");

$FM->setDatabaseUserPassword("");

$FM->setCommand("");

and then I have to set your code, for example:

$last_name = file_get_contents( the url );

echo $last_name

Edited by Guest
Link to comment
Share on other sites

This topic is 6674 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.