Generate PHP Sites

Use this dialog to generate a barebones PHP app. Per each checked table, a list page and an edit form are generated. You can also optionally create a simple PDF report script, using FPDF, based on the filtered rows from the list page.

There are currently no options for generating an app using a template engine, ORM, or MVC framework, though those features may come in a future version. The generated app is not meant to be a final, secure, Internet-ready app. Use the scripts as a starting point for a simple Intranet app. Baby steps!

  • Select 'Site Code Generator' from the 'Tools' menu to open the Site Code Generator dialog. Generate Site Project
  • If you check the 'Include Bootstrap Framework' option, you should download the framework from the 'http://getbootstrap.com/' site and save the 'css/' and 'js/' folders to the application root directory.
  • Checking the 'Include Session Handling' will enable popups that allow selecting a user table. Select different database table columns for users and passwords. It is required that you select the Token and Timestamp columns, as well. Here's an example user table, though the names and precise column datatypes and sizes can vary somewhat.
    CREATE TABLE `users` (
      `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `name` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '',
      `password` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '',
      `email` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '',
      `created` date NOT NULL DEFAULT '0000-00-00',
      `token` varchar(100) COLLATE latin1_bin NOT NULL,
      `t_modified` datetime DEFAULT NULL,
      PRIMARY KEY (`id`)
    )
    
  • If you check the 'Use FPDF Report' option, you should download the library file from 'http://www.fpdf.org/ 'and save 'fpdf.php' and the 'fonts/' folder to the application root directory. Generate Site Schema
  • For each table you select in the 'Schema' tab, a list and edit PHP script will be generated. Double-click the table to open an Info dialog that will allow you to select a child table and the columns that provide the foreign key relationship into that child table.
  • You can also set the override number of generic search fields at the top of the list page.
  • Generate Site Output
  • The Output tab displays the generated scripts. Use the 'Write' button to save these scripts to the filesystem path in the lower right textfield.

Back to Table of Contents.