nander Posted December 1, 2011 Share Posted December 1, 2011 Here is my code. $display_block .= " <P>Showing posts for the <strong>$topic_title</strong> topic:</p> <table width=100% cellpadding=3 cellspacing=1 border=1> <tr> <th>AUTHOR</th> <th>POST</th> </tr>"; while ($posts_info = mysql_fetch_array($get_posts_res)) { $post_id = $posts_info['post_id']; $post_text = nl2br(stripslashes($posts_info['post_text'])); $post_create_time = $posts_info['fmt_post_create_time']; $post_owner = stripslashes($posts_info['post_owner']); //add to display $display_block .= " <tr> <td width=35% valign=top>$post_owner<br>[$post_create_time]</td> <td width=65% valign=top>$post_text<br><br> <a href=\"replytopost.php?post_id=$post_id\"><strong>REPLY TO POST</strong></a></td> </tr>"; } //close up the table $display_block .= "</table>"; } ?> <html> <head> <title>Posts in Topic</title> </head> <body> <h1>Posts in Topic</h1> <?php print $dislplay_block; ?> </body> </html> Link to comment https://forums.phpfreaks.com/topic/252174-cant-get-table-to-show-up-in-html-area/ Share on other sites More sharing options...
Guest Posted December 1, 2011 Share Posted December 1, 2011 Is all of the HTML not showing up? Or just the data ? Link to comment https://forums.phpfreaks.com/topic/252174-cant-get-table-to-show-up-in-html-area/#findComment-1292871 Share on other sites More sharing options...
nander Posted December 1, 2011 Author Share Posted December 1, 2011 Just the data. Link to comment https://forums.phpfreaks.com/topic/252174-cant-get-table-to-show-up-in-html-area/#findComment-1292872 Share on other sites More sharing options...
btellez Posted December 1, 2011 Share Posted December 1, 2011 More specifically, does any of the $display_block actually get output? Or are you just missing additional stuff that being concatenated in the loop? Link to comment https://forums.phpfreaks.com/topic/252174-cant-get-table-to-show-up-in-html-area/#findComment-1292905 Share on other sites More sharing options...
nander Posted December 1, 2011 Author Share Posted December 1, 2011 correct non of the $display_block gets output. Link to comment https://forums.phpfreaks.com/topic/252174-cant-get-table-to-show-up-in-html-area/#findComment-1293173 Share on other sites More sharing options...
Pikachu2000 Posted December 1, 2011 Share Posted December 1, 2011 You spelled it wrong in the echo statement. Link to comment https://forums.phpfreaks.com/topic/252174-cant-get-table-to-show-up-in-html-area/#findComment-1293211 Share on other sites More sharing options...
PFMaBiSmAd Posted December 1, 2011 Share Posted December 1, 2011 This might be a good time to mention that you need to have php's error_reporting set to E_ALL (or even better a -1) and display_errors set to ON in your master php.ini so that php will help you by reporting and displaying all the errors it detects. You will save a TON of time. Link to comment https://forums.phpfreaks.com/topic/252174-cant-get-table-to-show-up-in-html-area/#findComment-1293212 Share on other sites More sharing options...
nander Posted December 2, 2011 Author Share Posted December 2, 2011 Pikachu2000 that was it great thank you so much, simple mistake but hard to find. Fresh eyes are the best. Link to comment https://forums.phpfreaks.com/topic/252174-cant-get-table-to-show-up-in-html-area/#findComment-1293617 Share on other sites More sharing options...
Pikachu2000 Posted December 2, 2011 Share Posted December 2, 2011 I had looked at this thread several times before I spotted it. Like was suggested above, having errors displayed would have made this about a 10 second fix. Link to comment https://forums.phpfreaks.com/topic/252174-cant-get-table-to-show-up-in-html-area/#findComment-1293643 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.