Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.