Title: Update problem with Shortcodes and PHP code in table cells
Last modified: August 30, 2016

---

# Update problem with Shortcodes and PHP code in table cells

 *  Resolved [FX_002](https://wordpress.org/support/users/fx_002/)
 * (@fx_002)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/update-problem-with-shortcodes-and-php-code-in-table-cells/)
 * Hello,
 * My problem initialy concerns Shortcodes update in table cells but it’s the same
   problem with a simple PHP code with the “PHP code in table cells” extension.
 * If i just put the following line in a cell and refresh the page in my Web browser:
   
   <?php echo date(“H:i:s”)?>
 * Then there’s two solutions :
    – if i am connected on my website, everything is
   fine and the time is update each time i refresh my browser – if i am not connected,
   the time is never update until i connect on WordPress, go on my dashboard and
   save the table. The time is updated one time and then time never update again
   when i refresh.
 * My real problem is with a shortcode which contain php code inside for connecting
   to my SQL database. But it’s the same problem of refreshing the time, i think.
 * Does anyone have a solution for that?
 * Thanks in advance.
    FX
 * [https://wordpress.org/plugins/tablepress/](https://wordpress.org/plugins/tablepress/)

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/update-problem-with-shortcodes-and-php-code-in-table-cells/#post-6228705)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * This is related to the table output caching that TablePress uses. You could turn
   that off by extending the used Shortcode to
 *     ```
       [table id=123 cache_table_output=false /]
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [FX_002](https://wordpress.org/support/users/fx_002/)
 * (@fx_002)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/update-problem-with-shortcodes-and-php-code-in-table-cells/#post-6228710)
 * Hello,
 * Maybe it would be good to have a checkbox somewhere in the tablepress setting
   to turn the output caching on/off and which describe the use of the output caching.
   Because it was very hard to find the solution on the forum.
 * But now it’s working perfectly with the extended Shortcode line.
 * Thanks a lot for this quick reply.
    Regards,
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/update-problem-with-shortcodes-and-php-code-in-table-cells/#post-6228711)
 * Hi,
 * good to hear that this worked!
 * I’m not sure that a checkbox would be helpful here. Most users will never care
   about this (because they are not using dynamic content), and they might even 
   be confused by an extra checkbox that they don’t understand (because it’s something
   very technical).
    I therefore think that the Shortcode option is much better.
   I agree that it could be documented better though, yes.
 * Best wishes,
    Tobias
 *  Thread Starter [FX_002](https://wordpress.org/support/users/fx_002/)
 * (@fx_002)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/update-problem-with-shortcodes-and-php-code-in-table-cells/#post-6228712)
 * Yes, the checkbox may be confuse. I agree.
 * Thanks a lot for what you do.
    TablePress is very nice and very simple to use.
 * Regards,
    FX
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/update-problem-with-shortcodes-and-php-code-in-table-cells/#post-6228713)
 * Hi,
 * thanks for the nice words, I really appreciate it!
 * Best wishes,
    Tobias
 * P.S.: In case you haven’t, please [rate TablePress](http://wordpress.org/support/view/plugin-reviews/tablepress)
   here in the plugin directory. Thanks!

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

The topic ‘Update problem with Shortcodes and PHP code in table cells’ is closed
to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

## Tags

 * [php code](https://wordpress.org/support/topic-tag/php-code/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)
 * [update](https://wordpress.org/support/topic-tag/update/)

 * 5 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/update-problem-with-shortcodes-and-php-code-in-table-cells/#post-6228713)
 * Status: resolved