Good idea about the test. I created a very basic page using the short code below (taken from mysql documentation) and it works fine. The only difference between this code and my code that is not working is that I have a db include file that has the connect info. In each php file I include this db file. I know the info in that file is correct, but maybe my code is not finding that include file...
I'll keep working on it. Thanks
<?
include_once("admin/config/general.inc.php");
include_once("admin/config/options.inc.php");
include_once("admin/config/globalad.inc.php");
include_once("admin/config/globaluser.inc.php");
?>
<HTML>
<HEAD>
<TITLE> Our List of properties </TITLE>
<HEAD>
<BODY>
<?php // Connect to the database server
$dbcnx = @mysql_connect("localhost",
"user", "password");
if (!$dbcnx) {
echo( "<P>Unable to connect to the " .
"database server at this time.</P>" );
exit();
} // Select the jokes database
if (! @mysql_select_db("scenicrentals") ) {
echo( "<P>Unable to locate the joke " .
"database at this time.</P>" );
exit();
} ?>
<P> Here are properties in our database: </P>
<BLOCKQUOTE> <?php
// Request the text of all the jokes
$result = mysql_query(
"SELECT sitedescription FROM ad where siteid = 5");
if (!$result) {
echo("<P>Error performing query: " .
mysql_error() . "</P>");
exit();
} // Display the text of each joke in a paragraph
while ( $row = mysql_fetch_array($result) ) {
echo("<P>" . $row["sitedescription"] . "</P>");
} ?> </BLOCKQUOTE>
</BODY>
</HTML>