I'm trying to pull from text from a database and display it on screen. Simple enough, but it doesn't work.
Here, the code on my index page
$homepage_text= get_Homepage_text();
display_Homepage ($homepage_text);
Here's the code for the above functions that are aquired via include
function get_Homepage_text()
{
$conn = db_connect();
$query = 'select Homepage_text
from Homepage where id=1';
$result = @mysql_query($query);
if (!$result)
return false;
$num_cats = @mysql_num_rows($result);
if ($num_cats ==0)
return false;
return $result;
}
and
function display_Homepage($homepage_text)
{
echo '<div id="Homepage_text" style="position:absolute; left:20px; top:300px; width:600px; height:200px; z-index3">
<table width = \"100%\" border = 0><tr>';
echo '<td valign="top">';
echo '<span class="details">';
echo $homepage_text;
echo '</div>';
}
But all I get on my screen is "Resource id #12"
why is my code not working? And what is "Resource id #12" ?
thanks in advance