rseidl
09-17-2003, 03:51 PM
<noob-alert />
I am trying to do my first DB fetches from a web page (.../forum/example.php) and am using this code:
<html><head></head><body>
<?php
error_reporting(7);
echo("Latest posts<p>");
include( "global.php");
$latestthread=$DB_site->query("SELECT title,threadid,dateline FROM thread ORDER BY dateline DESC LIMIT 20");
while ($latestthreads=$DB_site->fetch_array($latestthread)) {
echo ("$latestthreads[title]<br>");
}
?>
</body></html>
Now the strange thing is it only works sometimes, at other times I get a standard error template (including some goobledigook about being "Unable to add cookies, header already sent") back from PHP which I assume means it could not get the data for some reason ?
Perhaps relevant: the forum directory is a passworded realm for my apache server, but IE correctly asks me for the pw/login for example2.php
(I have a feeling it is the include("global.php") statement that is bombing, since taking everything else but that away i still get the error)
The server is running on Win2K, and I am browsing from an XP HE/IE 6 client.
Thanks
Robert
I am trying to do my first DB fetches from a web page (.../forum/example.php) and am using this code:
<html><head></head><body>
<?php
error_reporting(7);
echo("Latest posts<p>");
include( "global.php");
$latestthread=$DB_site->query("SELECT title,threadid,dateline FROM thread ORDER BY dateline DESC LIMIT 20");
while ($latestthreads=$DB_site->fetch_array($latestthread)) {
echo ("$latestthreads[title]<br>");
}
?>
</body></html>
Now the strange thing is it only works sometimes, at other times I get a standard error template (including some goobledigook about being "Unable to add cookies, header already sent") back from PHP which I assume means it could not get the data for some reason ?
Perhaps relevant: the forum directory is a passworded realm for my apache server, but IE correctly asks me for the pw/login for example2.php
(I have a feeling it is the include("global.php") statement that is bombing, since taking everything else but that away i still get the error)
The server is running on Win2K, and I am browsing from an XP HE/IE 6 client.
Thanks
Robert