$sql_fixcash = "SELECT * FROM phpbb_topics WHERE topic_id = '$topic_id'"; if( !$results_fixcash = $db->sql_query($sql_fixcash) ) { echo 'ERROR!: ' . $db->sql_error(); } $row_fixcash = $db->sql_fetchrow($results_fixcash); if( $row_fixcash['topic_poster'] == $userdata['user_id'] ) { $cash_message = 'You are the topic author, you cannot recieve money for posting in your own topic!'; } else { $cash_message = $GLOBALS['cm_posting']->update_post($mode, $post_data, $forum_id, $topic_id, $post_id, $topic_type, $bbcode_uid, $post_username, $post_message); }