Return Seperate PHP Script Within HTML

LostBit

New Member
So I have a "print.php" script that basically fetches data from MySQL and creates a tiny pretty HTML table.\[code\] echo " <table cellpadding=\"2\" cellspacing=\"2\" border=\"0\" width=\"10%\"> <tr bgcolor=\"#666666\"> <td colspan=\"2\" align=\"center\"><b><font color=\"#FFFFFF\">" . $table[0] . "</font></td> </tr> <tr> <td>Name</td> <td>Score</td> </tr>";echo "<tr"; if ($i % 2 == 0) echo " bgcolor=\"#CCCCCC\""; echo "> <td>" . $col['player'] . "</td> <td>" . $col['score'] . "</td> </tr>";\[/code\]Now I want this table to appear in my index.html. But its in the separate php script.I want to keep the php script separate from the HTML because the script is not only a tad large, but it has my SQL information in it to which I don't want in the plain HTML.Is there a way to fetch this echo in my php script from my html page?
 
Back
Top