I have 2 pages. One is form.php which asks for input in a form. The other is template.php which uses the variables inputted into form.php.
One of the things which is entered into the form is $page_name. The .php extension is automatically added to $page_name in template.php. So if I entered "page" into the page name field on form.php, "page.php" would be created as a copy of template.php.
This works fine and dandy but here is my problem. None of the variables are being sent to "page.php". Everything shows up fine in template.php but the variables aren't being copied.
I also want the variables to permanently stay in "page.php". I want to change the extension to .htm but then my php code doesn't get parsed and shows up in the source code...
So here is an example of what I want. On form.php I enter "roofing" for the page name, and "Best Roofing Information" for the title. $page_name and $title are displayed on template.php and roofing.php is created. Now I want roofing.php to display $title and I want only the clean HTML saved, not any of the php.
Thanks in advance for any help and suggestions.