Freeway PHP/MySQL examples 

 

 

 

 

Home | Freeway Examples | Freeway PHP/MySQL | Contact Us

 

 

 

 

 

It seems there are a few php or php/MySQL newcomers puzzeled at how to integrate php, or php and MySQL into Freeway, well if you are just starting out on this venture then these Freeway examples might help you on your way. Your server will need to be able to parse php for all the examples, a MySQL database is needed for the "database" examples. If you do not know how to test php pages on your computer then upload them to your server if your server account includes php.
Note:
php pages will not be WYSIWYG in Freeway.

 

 

 

 

 

 

 

 

Firstly, these are not tutorials on php or MySQL, if you have no knowledge of using either then some of these examples may not help you very much. They show some of the ways to integrate php and MySQL with your Freeway site. You should have at least a beginners knowledge of using php for the php examples, php and MySQL to a stage where you can write a script to make and retrieve MySQL database entries for the MySQL examples, you should also have some basic working knowledge of Freeway. If you want to know more about how to learn php and MySQL then do yourself a favour and buy a good book on the subject. I recommend: PHP and MySQL Web Development, ISBN 0-672-32525-X, it is a great book and you will save yourself a lot of pain and hair by buying it. The php.net web site is a great source of information on php, don't forget to bookmark the site because if you start to use php then you will be a regular visitor to it. php.net also have user examples of all the in-built functions and directions on how to use them, for some quick start tips you might also pop over to Keith's php/mysql primers pages.

 

 

 

 

 

There are php scripts included with some of these examples, these are supplied not to show you how to make database queries or write the code for tables but are needed for some of the examples to work, although I have kept them very simple and added some brief comments throughout. You can of course still inspect the examples in Freeway without the need to preview them on your computer, the results can be seen for each example by selecting the "View this page" links below.

 

 

 

 

 

PHP can be added or used within Freeway pages in different ways, the examples here show just a couple of ways of doing this. There are php and MySQL actions on the Softpress web site, which offer users other ways of integrating php & MySQL with Freeway, but I have not included these action examples here. I personally use only the "PHP Form action" and the "PHP Dynamic Page Titles" php actions. This is a personal preference, I like to keep as much of the php as possible and all MySQL queries off my Freeway pages, as I find it easier to update and maintain the php code while contained in separate scripts. Others may prefer to use actions or a combination of both, it basically boils down to personal preference.

 

 

 

 

 

The Examples

 

 

 

 

 

 

 

 

 

 

 

This is a very basic example that shows how you can use php variables on a Freeway page. []

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

This shows how to pass a field value from one Freeway page to another using php. []

 

 

 

 

 

 

 

 

 

 

 

 

Download the example

 

 

 

 

 

 

 

This shows one of the ways of how you can create a contact form in Freeway using php. This example uses a very simple inlcude file 'PHP script' to process the form values and send the email, there is also the option to send a copy of the message to the senders address as confirmation. []

easiForm is now available to take all the hard work out of your form processing and offers some protection against spam. With easiForm you need only set the element names as required by easiForm, place a small snippit of include code on your form then adjust the simple configuration file for your email along with any other options you might like to adjust.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

This shows an example of getting data from a MySQL database and printing it to your Freeway page, you will need access to a MySQL database to run this example. This download will contain the query script for retreaving information from the database and a dump file for creating and populating the database tables. The user will need to create the database using phpMyAdmin or other. []

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

This shows an example of returning rows of data from a MySQL database and printing it onto your Freeway page, the returned data is set in links so the user can then see how a link can be used to return specific data from the same database by accessing the same query script when passing the variables in the url. v1.2 has a very simple Search page added to the example. You will need access to a MySQL database to run this example. This download will contain the query script for retreaving information from the database and a dump file for creating and populating the database tables. The user will need to create the database using phpMyAdmin or other. []

 

 

 

 

 

 

 

 

 

 

 

 

 

Download the example

 

 

 

 

 

 

 

This shows a very simple example of a small dynamic web site, the site appears to consist of 4 pages but in reality has only 1. Relative data from a MySQL database is printed to the page depending on which menu item has been selected. Again, there are many ways of using PHP in Freeway, this shows an example of one of them. In this example the query script is included at the top of the page, two queries are made depending on the menu selected, one query retreaves the text for the inserts in the left hand yellow column of the page and the second for the actual page text, then we simply print the variables containing the data to the desired areas of the page and we are done. You will need access to a MySQL database to run this example. This download will contain the query script for retreaving information from the database and a dump file for creating and populating the database tables. The user will need to create the database using phpMyAdmin or other. []

 

 

 

 

 

 

 

 

 

 

 

 

These examples show some of the basics for using php and php/MySQL with Freeway, with a little imagination they can be expanded on to create fully blown applications using Freeway, here are just a couple of example sites of what can be achieved using php and MySQL with Freeway:

 

 

 

 

 

 

 

 

 

 

 

www.holidayrentalshub.com

 

 

www.egbs-properties-andalucia.com

 

 

 

 

 

 

 

If you have any questions, feedback or comments then please Contact Us

 

 

 

 

 

 

 

 

madewithfreeway4b1

 

 

 

 

 

 

 

 

 

 

Copyright © Mike Brackenridge 2006 - 2024 || Freeway is a registered trademark of Softpress Systems Limited.