MySQL Connect

Part of: PHP Actions

Versions

Pro Only

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;
?>

  Register or log in to add tags

Register or log in to view or add comments.

FreewayTalk

Join the friendliest community on the Net at FreewayTalk. Ask and answer questions about Softpress Freeway, or just gather around the virtual water cooler!