I have a website that is hosted with a company called HFTB. For whatever reason the main directory of my site does not support php, but if I create a subdirectory and call it php, I can call php scripts all day long.
The problem I am having is that I want to display the output of a small php script ("5g.php") on my home page (which is limited to an html tag).
I have tried using the <script> </script> tags, but I am getting no results.
Here is the PHP script:
<?php
@define ("MYSQL_CONNECT_INCLUDE", "connect_db.php");
include(MYSQL_CONNECT_INCLUDE);
$query = "SELECT * FROM reports WHERE time!='00:00:00' ORDER BY date DESC, time DESC limit 5";
$result = mysql_query($query);
$number = mysql_numrows($result);
if ($number > 0) {
print "<table>";
print "<tr>";
print "<td bgcolor=#000080 width=69 height=12 align=left><font face=Arial color=#FFFFFF size=1><center><b>PILOT ID</b></font></center></td>";
print "<td bgcolor=#000080 width=81 height=12 align=left><font face=Arial color=#FFFFFF size=1><b><center>DATE FILED</center></b></font></td>";
print "<td bgcolor=#000080 width=80 height=12 align=left><font face=Arial color=#FFFFFF size=1><b><center>LOG BOOK</b></center></font></td>";
print "</tr>";
for ($i=0; $i<$number; $i++) {
$id = mysql_result($result,$i,"pilot_id");
$date = mysql_result($result,$i,"date");
$time = mysql_result($result,$i,"time");
$fsacars = mysql_result($result,$i,"fsacars_rep_url");
$pilot_id = $id-1;
?>
<table border="1">
<tr>
<td bgcolor=#F0F8FF width=65 height=12 align=left><font face=Arial size=1 color=#000080><center><? if ($pilot_id<10)
{ echo "MXP00"; echo $pilot_id; } else { echo "MXP0"; echo $pilot_id; } ?></center></font></td>
<td bgcolor=#F0F8FF width=80 height=12 align=left><font face=Arial size=1 color=#000080><center><? echo $date; ?></font></center></td>
<td bgcolor=#F0F8FF width=75 height=12 align=left><font face=Arial size=1 color=#000080><center><a href="<? echo $fsacars; ?>">VIEW REPORT</a></font></center></td>
</tr>
</table>
<?
}
print "</table>";
}
mysql_close();
?>
And here is the line of the HTML page where I want the output to appear:
<script src="/php/5g.php"></script>
Getting no results showing on my html page.