Forum Moderators: coopster
I have added this coding for threads page and it is showing properly in title bar
<?$select_category_SQL = "select * from $database_table_name1 where category_id='".$cat_id."'";
$select_category_query = bx_db_query($select_category_SQL);
SQL_CHECK(0,"SQL Error at ".__FILE__.":".(__LINE__-1));
$select_category_result = bx_db_fetch_array($select_category_query);
if (!$HTTP_GET_VARS['p'])
echo " ".$select_category_result['category_name'.$slng]."";
else
echo '<font style="text-decoration:none;color:#CC0000">'.$select_category_result['category_name'.$slng].'</font>';
?> and when i added this for posts it is showing nothing in title bar im confused where im doing wrong
<?$select_joke_SQL = "select * from $database_table_name2 where joke_id='".$joke_id."'";
$select_joke_query = bx_db_query($select_joke_SQL);
SQL_CHECK(0,"SQL Error at ".__FILE__.":".(__LINE__-1));
$select_joke_result = bx_db_fetch_array($select_joke_query);
if (!$HTTP_GET_VARS['p'])
echo " ".$select_category_result['joke_title'.$slng]."";
else
echo '<font style="text-decoration:none;color:#CC0000">'.$select_joke_result['joke_title'.$slng].'</font>';
?> and post title is showing ok on page of the site and coding for that
<td style="color:#185616;font-size:9pt;"> <b>
<?=TEXT_TITLE?>
</b> <font color="#CC0000">
<?=$select_joke_result['joke_title']?> Plz plz help me.
[edited by: coopster at 10:34 pm (utc) on Jan. 30, 2009]
[edit reason] formatted code [/edit]
By the way, the HTTP_* variables [php.net] are deprecated, you really should be looking at the $_GET superglobal [php.net].
<?$select_joke_SQL = "select * from $database_table_name2 where joke_id='".$joke_id."'";
$select_joke_query = bx_db_query($select_joke_SQL);
SQL_CHECK(0,"SQL Error at ".__FILE__.":".(__LINE__-1));
$select_joke_result = bx_db_fetch_array($select_joke_query);
if (!$HTTP_GET_VARS['joke_title'])
echo " ".$select_joke_result['joke_title'.$slng]."";
else
echo '<font style="text-decoration:none;color:#CC0000">'.$select_joke_result['joke_title'.$slng].'</font>';
?>
Plz help me out
Database table name
******************************************************************************/
$bx_table_prefix = 'jokesite_';
$bx_db_table_joke_categories= $bx_table_prefix.'category';
$bx_db_table_image_categories= $bx_table_prefix.'fun_category';
$bx_db_table_censor_categories= $bx_table_prefix.'censor_category';
$bx_db_table_newsletter_categories= $bx_table_prefix.'newsletter_category';
$bx_db_table_jokes= $bx_table_prefix.'jokes';
$bx_db_table_images= $bx_table_prefix.'postcard_images';
$bx_db_table_rating= $bx_table_prefix.'rating';
$bx_db_table_votes= $bx_table_prefix.'votes';
$bx_db_table_postcard_messages= $bx_table_prefix.'postcard_messages';
$bx_db_table_daily_newsletters= $bx_table_prefix.'daily_newsletters';
$bx_db_table_newsletter_subscribers= $bx_table_prefix.'newsletter_subscribers';
it was correct coding
<?$select_joke_SQL = "select * from $database_table_name2 where joke_id='".$joke_id."'";
$select_joke_query = bx_db_query($select_joke_SQL);
SQL_CHECK(0,"SQL Error at ".__FILE__.":".(__LINE__-1));
$select_joke_result = bx_db_fetch_array($select_joke_query);
if (!$HTTP_GET_VARS['joke_title'])
echo " ".$select_joke_result['joke_title']."";
else
echo '<font style="text-decoration:none;color:#CC0000">'.$select_joke_result['joke_title'].'</font>';
?>