I have wrote a small script that connects to a database and dumps the results to the screen but the page keeps trying to refresh itself!! Has anyone else had similar problems with PHP pages trying to refresh theirselves when a large amount of data is sent to the page?
If I print info from a small database, it works fine. It's just when I'm printing a large amount of data. Does PHP have a timeout setting before it refreshes the page?
Here's the code if anyone wants to see it...
<HTML>
<HEAD>
</HEAD>
<BODY>
<?php
// Program to test connecting to a Microsoft Access ODBC Data Source
$connection = odbc_connect("pattest", "", "");
print "Connected to datasource<BR><BR>";
if ($result = odbc_exec($connection, "SELECT AssetNum, CliNum, ApplianceID, TestDate, AllPFS FROM results"))
print "Command executed successfully<BR><BR>";
else
print "Error while executing command<BR><BR>";
// Print results
while(odbc_fetch_row($result))
print odbc_result($result, 1) . " " . odbc_result($result, 2) . " " . odbc_result($result, 3) . " " . odbc_result($result, 4) . " " . odbc_result($result, 5) . "<BR>";
odbc_close($connection);
print "<BR>Connection closed.";
?>
</BODY>
</HTML>
Any thoughts anyone?