Include the Script

You can run the script as stand-alone and customize the layout using the HTML template. If that is the case, you can skip this chapter.

You can include the script in other PHP files so that it fits into an existing website and matches the layout. Here is what you do:

Step 1

You can use the PHP statement include to include the script at the very top (the first line of the file, above every other character, with no character in front of it) of the file:

<?php include 'index.php'; ?>

Step 2

Go to the place in the file where you want the form to appear. Add following line of code:

<?php echo $f6l_output; ?>

Step 3

It is important that you delete this line of code from the file index.php. Otherwise the form will appear on top of your page. Look for this line at the bottom of the file index.php:

echo $f6l_output;

You can also change it into a comment by adding two slashes in front of the line, like so:

//echo $f6l_output;

Step 4

Unless the file where you're including the script resides in the same folder as the index.php, you'll need to change the path to the script in the variable $script_root in index.php.

Step 5

Since you are including the script, you probably won't need the HTML head structure. Just strip it from the HTML template form.tpl.html and leave everything between <body> and </body> intact.

Done.