Title: bbthoms's Replies | WordPress.org

---

# bbthoms

  [  ](https://wordpress.org/support/users/bbthoms/)

 *   [Profile](https://wordpress.org/support/users/bbthoms/)
 *   [Topics Started](https://wordpress.org/support/users/bbthoms/topics/)
 *   [Replies Created](https://wordpress.org/support/users/bbthoms/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/bbthoms/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/bbthoms/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/bbthoms/engagements/)
 *   [Favorites](https://wordpress.org/support/users/bbthoms/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[TablePress - Tables in WordPress made easy] PHP Variable in Tablepress](https://wordpress.org/support/topic/php-variable-in-tablepress/)
 *  Thread Starter [bbthoms](https://wordpress.org/support/users/bbthoms/)
 * (@bbthoms)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/php-variable-in-tablepress/#post-5646339)
 * Hi Tobias,
 * thank you for the fast reply. I tried the global but in the template file. Obviously
   it was the wrong place.
 * Thank you very much!
 * Cheers
    bb
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[TablePress - Tables in WordPress made easy] PHP Variable in Tablepress](https://wordpress.org/support/topic/php-variable-in-tablepress/)
 *  Thread Starter [bbthoms](https://wordpress.org/support/users/bbthoms/)
 * (@bbthoms)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/php-variable-in-tablepress/#post-5646333)
 * Hi Tobias,
 * oh yes you’re right. Where I can edit my first post?
 * Here is my code (simplified):
 *     ```
       <?php
       /*
       Template Name: Konf
       */
       ?>
       <?php
       $countobject1 = $_POST['object1'];
       if ($countobject1 == ''){
       	$countobject1 = '1';
       	}
       $countobject2 = $_POST['object2'];
       if ($countobject2 == ''){
       	$countobject2 = '1';
       	}
       $count_offn = $countobject1 + $countobject2;
       ?>
       .... etc. ...
       ```
   
 *  After that I get the page content (table via tablepress and the php extension).
   Within this table is written:
 * `<?php echo $count_offn; ?>`
 * In debug mode I get this error:
 * `Notice: Undefined variable: count_offn in /Applications/MAMP/htdocs/XXX/wp-content/
   plugins/tablepress-php-in-tables/tablepress-php-in-tables.php(26) : eval()'d 
   code on line 1`
 * Cheers & Thx
    bbthoms

Viewing 2 replies - 1 through 2 (of 2 total)