I've written this code to
<?php $getnamequery = "SELECT cat_title FROM store_categories WHERE id = '$catid'";?> <?php $cat_name = mysql_query($getnamequery) or die(mysql_error());?>
What would happen is the variable
$catid would be filled in with a number, for instance 1.
The table store_categories looks like this
id cat_title 1 Humor 2 Biographies ect...
If $catid is equal to 1 I want to get the string
I've tried this php code
<?php echo $cat_name['cat_title'];?>
But it returns nothing