MySQL

Can someone explain me how to link a Freeway Pro Page to a mysql Database, where a user can fill out a form?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

By far the easiest way would be to use FormsToGo http://www.bebosoft.com/products/formstogo/overview/. The alternative is rolling up your sleeves and getting hands-on, code-wise.

Todd
http://xiiro.com

Can someone explain me how to link a Freeway Pro Page to a mysql Database, where a user can fill out a form?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

There are literally millions of ways to do this, and as many examples floating around the Web. Paul Dunning wrote a set of MySQL Actions many years ago, they are still on the ActionsForge, and they may still work, but they haven’t been updated in years, and MySQL, PHP and Apache have all had major revisions since that time.

In high-level terms, what you need to do to allow users to fill out a form is as follows:

Make a form in Freeway, and in the Form Setup dialog, enter the filename or URL of your form handler. (If you want to see what your form is currently posting, you can use my generic “Reflector” endpoint: just enter Reflector as the Action. This won’t do anything, it’s just a debugging tool.)

Make the form handler script, usually in PHP. This is a program, written in PHP, which accepts the form input, loops through it, and creates local variables (holding places for data) for each of the fields in your form. If you had a form with name, rank, and serial_number as the fields, and you had set your form to POST, you would end up with an array like this:

$_POST = array( 'name' => 'Joe', 'rank' = 'Captain', 'serial_number => '12345' );

Your form handler would need to convert those into local variables, like $name, $rank, and $serial_number.

Then, assuming that the data was correctly formed (which your handler would also need to test) you would create a connection to the database server, convert the local variables into a query, and then execute that query against the server. Exactly how you do that is implementation-specific. On a modern (PHP 5.1 or better) server, you can use PDO (PHP Data Objects) to interface securely and safely with the database server. The MySQL Actions do not use this technique.

Walter

On Mar 4, 2013, at 1:26 PM, TomP wrote:

Can someone explain me how to link a Freeway Pro Page to a mysql Database, where a user can fill out a form?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Can someone explain me how to link a Freeway Pro Page to a mysql Database, where a user can fill out a form?

If you can tell us what you want this form to do with the info that would help too. Do you really need a database to process it?

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thank you I will check it and come back…


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options