ho here is the structure that I have been using.
index.php page:
<?php
include ("fusion.php");
include ("forms.php");
$webForm = "Entry"; //specify which form you want to work with
$form = new forms; // create an instance of selected class
$form->setFormData($webForm); // populate class variables selected form
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Script-Type" content="text/javascript; charset=UTF-8;" />
<title>Index Page!</title>
<?php
$form->outputHeaderData(); // echo any content in the head section
?>
</head>
<body <?php $form->ouputBodyAttributeData(); // echo any content that is suppose to be in body tag ?>>
<?php
$form->outputForm($webForm); // echo any content in the body section
?>
</body>
</html>
forms.php contains functions that echo html data ex:"outputForm($webForm); " , but since the page started to get too big 1.5 k of lines an growing, I started to separate it, so the first thing I did was take out all js scripts and put forms.php into separate files. Which gave me the following error of php no working in js. So as the person said earlier to one of my post, put it into a separate php file which echoes the content. I though then, thats a good idea, I will make a separate php page for every form content and make form content call them and out put them where user wants to. But then if I use include on every single php file and not use them, i will just waste memory. Is there any way around it.