hamza Posted October 11, 2009 Share Posted October 11, 2009 ACTUALLY I WANT TO SHOW PAGE CONTENTS THAT ARE FETCHING FROM DATABASE TABLE AND THAT CONTENTS CONTAIL PHP +HTML CODE. IF I ECHO THE CONTENTS THEN PHP CODE IS ALSO ECHOED TO THE BROWSER PLEASE GIVE ME ANY SOLUTION FOR IT MY CODE IS SHOWN BELOW. PAGE PRESENT IN TABLE <div id="page_contents"> <table border="0" width="100%" cellspacing="1" cellpadding="3" class="white"> <?php $sql = "SELECT * FROM ".$dbtables['tab_1']; $result = $db->query(getPagingQuery($sql,FAQ_PP)); $count = 1; while($row = $db->fetchNextObject($result)) { if ( $count%2 ) { $class = "admin_white"; } else { $class = "admin_gray"; } ?> <tr> <th width="413" class="admin_white" align="left"><strong><em><?=$row->question;?></em></strong></td> </tr> <tr> <td class="<?=$class?>" width="413" align="left"><?php echo $row->answer; ?></td> </tr> <?php $count++; } ?> <tr> <td align="center"><?php echo getPagingLink($sql,FAQ_PP, $strGet = ''); ?></td> </tr> <tr> <td colspan="4" align="center"> </td> </tr> </table> </div> <hr> <p> </p> HOW I AM FETCHING IS SHOW BELOW <div id="content"> <?php echo $contents; ?> </div> PROBLEM IS WHEN I FETCH THE PAGE CODE THEN I SHOW ME PHP CODE + HTML AS WELL . BUT I AM EXPECTING HTML ONLYN. Quote Link to comment https://forums.phpfreaks.com/topic/177332-page-contents-need-to-show/ Share on other sites More sharing options...
.josh Posted October 11, 2009 Share Posted October 11, 2009 I'M NOT ENTIRELY SURE WHAT YOU'RE GOAL HERE IS BUT OFFHAND I THINK YOU MIGHT WANT TO LOOK INTO EVAL Quote Link to comment https://forums.phpfreaks.com/topic/177332-page-contents-need-to-show/#findComment-935033 Share on other sites More sharing options...
hamza Posted October 12, 2009 Author Share Posted October 12, 2009 CAN ANYONE SEPARATE PHP AND HTML CODE FROM THE ABOVE CODE. Quote Link to comment https://forums.phpfreaks.com/topic/177332-page-contents-need-to-show/#findComment-935420 Share on other sites More sharing options...
trq Posted October 12, 2009 Share Posted October 12, 2009 WHAT EXACTLY DO YOU MEAN? Quote Link to comment https://forums.phpfreaks.com/topic/177332-page-contents-need-to-show/#findComment-935424 Share on other sites More sharing options...
waynew Posted October 12, 2009 Share Posted October 12, 2009 YOU SHOULD LEAVE THAT AS IT IS. IT ALLOWS DESIGNERS WITHOUT ANY KNOWLEDGE OF PHP TO EDIT THE DESIGN. Quote Link to comment https://forums.phpfreaks.com/topic/177332-page-contents-need-to-show/#findComment-935427 Share on other sites More sharing options...
Adam Posted October 12, 2009 Share Posted October 12, 2009 LOUUUUUUUD NOISESSS! Quote Link to comment https://forums.phpfreaks.com/topic/177332-page-contents-need-to-show/#findComment-935441 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.