AnsweredAssumed Answered

Filemaker PHP Beginner Questions

Question asked by jthawke on Sep 25, 2017
Latest reply on Sep 26, 2017 by jthawke

I'm working with a couple of clients who use website forms to collect and/or display data from MySQL.  Both sites are created with Rapidweaver using two different "stacks" that use PHP to transmit or receive data from MySQL so the code is hidden and proprietary.  Unfortunately, many web hosts (including mine) are forcing an update to PHP 7 and that breaks both of these forms . . . one completely, the second just won't submit to the database any longer.  I've been able to temporarily downgrade to PHP 56 but in a few weeks that won't be possible any longer.  I'm moving the sites to a temporary VPS host but a longer term solution is necessary, so I'm looking at posting directly to Filemaker which is where the data has been going to via ODBC. 

 

I intend to still use Rapidweaver and I'm learning how to create the necessary HTML input, select, etc. fields and the proper CSS to make it look the way that I'd like.

 

Where I am REALLY struggling is getting a handle on FM PHP . . . I've spent hours reading websites, book excepts, and even looking at the FM PHP examples included with server but I'm still not understanding how this works.  If someone could break down the basics to answer the following few questions, I'd appreciate it.

 

1.  Is ANY FM PHP code necessary / required on the actual FORM page?  At first I assumed it did because the SUBMIT button would be on that page, but it appears now that the form is nothing but a placeholder for data.

 

2.  If correct, then the SUBMIT button is actually just a link to a hidden .php page that DOES include the necessary FM PHP code to place the data into my database.  This page could also then show a "success" or "failure" message, call a script to send an email, etc.?

 

3.  This form has about 60 fields, 50 or so are either required or need to be entered with certain additional constraints, such as "correct email format" or "minimum and maximum number of characters".  I know the Filemaker database can do this, but what happens when someone DOESN'T enter the required data?  Can I send them back to the form again?  And if so, does it wipe out everything they've already entered?  Obviously, that isn't an option.

 

Or is this something that can be done via another method BEFORE being directed to the Filemaker PHP page? 

 

For the second client, I'll also need to be able to show the data from a specific record in another form page, but I believe in this case, the FM PHP information WOULD be called in the form page itself as the record being called is specific.  However, I'm certain I'll be able to figure out this step if I can get a general understanding of the process by getting the form data capture worked out.

 

I have several years of experience with Filemaker so any answers can be specific to the FM PHP process.

 

Finally, I have considered using WebDirect but the costs related to the number of users as well as the security of allowing DIRECT access to my FM Server combined with the fact that I'd like the form to look the same as the rest of the site has led me to this particular process.

 

Thank you in advance.

Outcomes