MySQL Connect
Part of: PHP Actions
Versions
MySQL Connect [1.2]: 24 Feb, 2009
Compatible:



Pro Only
- Upgrade to Freeway Pro to use this Action
Description
MySQL Connect generates PHP code so that the page can connect to a database. It has two settings, one for development and one for when the page is hosted on a server that is on line. Code created by this Action can be inserted onto another page using the Action ‘Include PHP Page’.
Application
This Action is a Page Action. Enter your database information in the text fields. The drop-down determines which set of data will be used. Switching this will cause all pages that use the PHP Include PHP Page to include this page to re-publish.
Code Produced
This is HTML generated by a blank Freeway page with this Action applied. The variable $fwServer will be 1 for development and 2 for live (just in case you need to make minor changes to code to allow for differing environments).
<?PHP
$fwDBName = "name";
$fwHost = "host";
$fwUser = "user";
$fwPassword = "password";
$fwLink = mysql_connect( $fwHost , $fwUser , $fwPassword );
$kfwDevelopment = 1;
$kfwLive = 2;
$fwServer = 1;
?>
