Title: dynamic table
Last modified: August 21, 2016

---

# dynamic table

 *  Resolved [milba1164](https://wordpress.org/support/users/milba1164/)
 * (@milba1164)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/dynamic-table-1/)
 * hello, i can seem to get anything to show when using table code – correct me 
   if I am wrong but it should have been a find & replace? I appreciate your help
   Cheers;
 * [insert_php] virtual(‘/Connections/VeganProducts.php’); [/insert_php]
    [insert_php]
   mysql_select_db($database_VeganProducts, $VeganProducts); $query_rsProductsList
   = “SELECT * FROM mmw_vProducts ORDER BY prodName ASC”; $rsProductsList = mysql_query(
   $query_rsProductsList, $VeganProducts) or die(mysql_error()); $row_rsProductsList
   = mysql_fetch_assoc($rsProductsList); $totalRows_rsProductsList = mysql_num_rows(
   $rsProductsList); [/insert_php]
 * <table border=”1″>
    <tr> <td>prodID</td> <td>prodName</td> <td>prodCat</td> <
   td>allergenSoy</td> <td>allergenNuts</td> <td>allergenGluten</td> <td>knownSupp
   </td> <td>substitute</td> <td>image</td> <td>confirmedBy</td> <td>dateAdded</
   td> <td>dateUpdated</td> </tr> [insert_php] do { ?> <tr> <td>[insert_php] echo
   $row_rsProductsList[‘prodID’]; [/insert_php]</td> <td>[insert_php]echo $row_rsProductsList[‘
   prodName’]; [/insert_php]</td> <td>[insert_php] echo $row_rsProductsList[‘prodCat’];[/
   insert_php]</td> <td>[insert_php] echo $row_rsProductsList[‘allergenSoy’]; [/
   insert_php]</td> <td>[insert_php] echo $row_rsProductsList[‘allergenNuts’]; [/
   insert_php]</td> <td>[insert_php] echo $row_rsProductsList[‘allergenGluten’];[/
   insert_php]</td> <td>[insert_php] echo $row_rsProductsList[‘knownSupp’]; [/insert_php]
   </td> <td>[insert_php] echo $row_rsProductsList[‘substitute’]; [/insert_php]</
   td> <td>[insert_php] echo $row_rsProductsList[‘image’]; [/insert_php]</td> <td
   >[insert_php] echo $row_rsProductsList[‘confirmedBy’]; [/insert_php]</td> <td
   >[insert_php] echo $row_rsProductsList[‘dateAdded’]; [/insert_php]</td> <td>[
   insert_php] echo $row_rsProductsList[‘dateUpdated’]; [/insert_php]</td> </tr>[
   insert_php] } while ($row_rsProductsList = mysql_fetch_assoc($rsProductsList));?
   > </table>
 * [insert_php]
    mysql_free_result($rsProductsList); [/insert_php]
 * [https://wordpress.org/plugins/insert-php/](https://wordpress.org/plugins/insert-php/)

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

 *  [WillBontrager](https://wordpress.org/support/users/willbontrager/)
 * (@willbontrager)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/dynamic-table-1/#post-4678680)
 * Hi milba1164,
 * Insert PHP doesn’t talk to code between [insert_php]…[/insert_php] blocks. In
   other words, this won’t work:
 *     ```
       [insert_php]$name='Will';[/insert_php]
       [insert_php]echo $name;[/insert_php]
       ```
   
 * But this will:
 *     ```
       [insert_php]$name='Will';
       echo $name;[/insert_php]
       ```
   
 * because the variable name assignment and the echo of the variable name are in
   the same code block.
 * More information here:
 * [http://www.willmaster.com/software/WPplugins/insert-php-wordpress-plugin-instructions.php#inandofitself](http://www.willmaster.com/software/WPplugins/insert-php-wordpress-plugin-instructions.php#inandofitself)
 * Will
 *  Thread Starter [milba1164](https://wordpress.org/support/users/milba1164/)
 * (@milba1164)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/dynamic-table-1/#post-4678788)
 * thanks but i still cant get it to work
    i can add a form with the variable drop
   down list but then any code i test (i use DMW) that calls for the data blanks
   out the page. cheers
 *  [WillBontrager](https://wordpress.org/support/users/willbontrager/)
 * (@willbontrager)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/dynamic-table-1/#post-4678791)
 * Suggest checking the server’s error log. It might provide some clues about what’s
   going on.
 * Will
 *  [WillBontrager](https://wordpress.org/support/users/willbontrager/)
 * (@willbontrager)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/dynamic-table-1/#post-4678883)
 * Because there has been no response, I’m assuming the original poster resolved
   the issue.
 *  [WillBontrager](https://wordpress.org/support/users/willbontrager/)
 * (@willbontrager)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/dynamic-table-1/#post-4678884)
 * Oops, forgot to check the “Mark this topic as resolved” checkbox.
 * Now checked.

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

The topic ‘dynamic table’ is closed to new replies.

 * ![](https://ps.w.org/insert-php/assets/icon-256x256.gif?rev=3523853)
 * [Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts](https://wordpress.org/plugins/insert-php/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-php/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-php/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-php/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-php/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-php/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [WillBontrager](https://wordpress.org/support/users/willbontrager/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/dynamic-table-1/#post-4678884)
 * Status: resolved