Ok, I am fairly new to php, so please bear with me if I have done something stupid.
I am trying to write a CMS, right now I am writing a piece of code to get the article title from the database. I used
<?
include('dbconnect.php');
//Get the article title
function article_title ()
{
$getarticletitlequery = "select title from article where id='$id'";
$printtitle = mysql_query($getarticletitlequery);
$fetchtitle = @mysql_fetch_object($printtitle);
$fetchtitle = ucfirst(strtolower($fetchtitle));
echo("$fetchtitle");
}
?>
to call the database, and when I do, nothing comes up. When I tell it to pull from printtitle, I get recourse id #4. There are things in the database. Any help would be great.