OK, I have one file index.php with a single php opening tag at the top, and a single closing tag at the bottom. Within that file I call something like 21 files using INCLUDE, each file having the .inc extension and containing non-escaped html. There are no other php tags anywhere - neither in the index.php file, nor in any of the include files.
As I understand it, and I am not sure exactly what the consequences of this are, using the include command transfers the text into the open php file at the point where the command is.
I took this to mean that the text is inserted into the html document that the php file is creating meaning it should be plain html, but it is also possible that the inserted text is being inserted into the php, in which case it should be escaped?
All the text in the INCLUDE files was previously contained in ECHO statements - I just copied and pasted what was between the " marks in the ECHO brackets into the INCLUDE files. The include files have no php code in them at all - just html.
Now things are pear shaped, I am wondering if I should really have been using PRINT or ECHO, and if I labelled the INCLUDE text properly... should I have escaped it or not? When is it html, and when is it a php instruction to create said html code?
...it's clear I don't really understand what is happening when I call the INCLUDE file, and I'd appreciate some clarity - the reading I have done has not helped!