Jump to content

PAGE CONTENTS NEED TO SHOW


hamza

Recommended Posts

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.

 

 

Link to comment
https://forums.phpfreaks.com/topic/177332-page-contents-need-to-show/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.