Can anyone see anything wrong with this code? :
<?
$user="myusername";
$password="mypassword";
$database="mydatabase";
mysql_connect("10.10.0.23",$user,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT id,pageTitle,pageContent FROM tbl_Content";
$result=mysql_query($query);
mysql_close();
$i=0;
while ($i < $num) {
$id=mysql_result($result,$i,"id");
$pageTitle=mysql_result($result,$i,"pageTitle");
$pageContent=mysql_result($result,$i,"pageContent");
?>
<? echo $pageTitle; ?></font><br />
<?
$i++;
}
echo "<hr size=1 width=90%>";
?>
|
I know there is data in database, as we can retrieve it with ColdFusion. However, when we attempt to retrieve it with PHP, only the horizontal line shows.
Thanks in advance,
Heather