the question was [basically] "How do I include PHP scripts in HTML files WITHOUT using iframes?".
to answer that you should just replace them with PHP files instead answers nothing...
here is a way to get PHP in your HTML if you:
1. do not have access to your conf file to set HTML files to be parsed as PHP
2. do not want to parse HTML files as PHP files
3. cannot replace HTML files with PHP files (prohibitive time/cost/etc.)
try this: in your HTML code call for a PHP file as the javascript source. in the PHP file, compile the HTML content that you want and echo to the browser a document.write().
you need 2 files to try this (test.html and test.php)
test.html ->
<html>
<head>
<title>PHP in HTML</title>
</head>
<body>
<script type='text/javascript' src='test.php'><script>
</body>
</html>
test.php ->
<?php
$query = "SELECT * FROM table_name"; //REPLACE WITH YOUR OWN MYSQL QUERY
$data = mysql_query($query);
while ($result = mysql_fetch_array($data))
{
$output .= "<b>$result[example1]</b>: $result[example2]<br />"; //REPLACE WITH YOUR OWN HTML COMPILATION
}
echo "document.write(\"".addslashes(stripslashes(str_replace("\r\n",null,$output)))."\")";
?>
NOTES:
you have to watch out for new lines inside the $output compilation using the keyboard. it will result in a javascript error.
also, you must be careful with quotes in $output. that's why i use the "addslashes(stripslashes($output))" (strip first so the content is clean, then add the slashes).