I am looking for a way to use existing HTML pages within my PHP application, basically so I or someone else can design the HTML pages using a HTML editor, and then "include" those pages within my PHP code. The idea is to to be to design/format/update the HTML pages separate from the PHP code.
I am using the following within my PHP code to display my HTML pages, which seems to work just fine
-require("./insert-band.html");
I then just wrap my needed PHP code around that statement
Most of my HTML pages will include forms, for working with mySQL tables. Each of the forms of course has an "action" that references the next page (HTML page included within PHP as above). So far I have no problem with taking the output of my forms, processing it via PHP against the mySQL tables, and then displaying the next HTML page. My problem occurs when I need to fill in the HTML form with data selected from mySQL tables.
I would prefer to have my HTML and my PHP separated as I am currently doing. I was thinking I could either place tags, perhaps HTML comments, within my HTML pages and then parse and output the HTML files, filling in the data based on the tags. Otherwise It would be nice if I could directly reference the fields within the HTML forms (ie FrmInsert.lstSelectPerson for a listbox lstSelectPerson on a form named frmInsert) and then just use my PHP code to fill in the data for that field.
any and all help and suggestions would be appreciated.
Patrick