I am trying to set up periodic updating of a database-generated html page using SQL and PHP ( See your tutorial 10 on PHP and SQL - lesson 5)
Unfortunately, although 'generateindex.php' runs OK, the HTML page at the end does not contain the data from the database, and instead prints out some of the PHP code - Any ideas ???
( My server is using PHP3 )
an html page will never parse any php code inside it.
So, if you have php code inside an html page then that will be sent to the browser, if you want it processed as php you need to name it .php not .html
Whats probably happening is your php generating page is generating some html along with some php (even though it runs fine) and that is what is causing you some problems.
Sorry if I did not make myself clear the first time.
'Generate.php' was a browser-called page that generated the html page dynamically from another dynamic php page.
What was happening was that I was not calling the 'parent' php page as a URL address, and thus (I think!) the server was not interpreting the php before creating the html 'daughter' page.
I have that fixed now - thanks.
since some of the code is coming out on the browser, i would, in my unscientific manner, put in a few signposts in the form of
and step the number 2, 3, 4, etc.
and identify exactly where the php code is coming from and look very closely at that area. ie. if they are between 3 and 4 on your page.
you have a problem right there. it is probably something simple.
this may not make the code do what you want but it will clean up the extra output.
oh, don;t forget to scrub the 1,2,3 etc.