Location: PHPKode > scripts > Free PHP Recipes Plug-n-Play Website Script > free-php-recipes-plug-n-play-website-script/r.php
<?php
/************* Recipe *****************************/
/*
Released by AwesomePHP.com, under the GPL License, a
copy of it should be attached to the zip file, or
you can view it on http://AwesomePHP.com/gpl.txt
*/
/************* Recipe *****************************/



$cat_title = mysql_escape_string(urldecode($QUERY[1]));
$get_list = "SELECT * FROM `recp_rec_list` WHERE `cat_title`='$cat_title'";

$is_count = @mysql_query($get_list);
	
$items_count = @mysql_num_rows($is_count); 
if($items_count > $display) { 
	$page_count = ceil ($items_count/$display_limit); 
} else { 
	$page_count = 1; 
}
if(is_numeric($QUERY[2])){ 
    $start = $QUERY[2]; 
} else { 
    $start = 0; 
} 
$get_rec = mysql_query($get_list . " ORDER BY `rec_id` DESC LIMIT $start,$display_limit");

$PAGE = 'R';
?>
<table width="<?=$PAGE_WIDTH;?>"  border="0" style="border:1px solid #FFDBCA;" align="center" cellpadding="5" cellspacing="0">
  <tr>
    <td width="50%" colspan="2"><div align="center"><font color="#999999" size="4">Please select a receipe: [ <?=number_format($items_count);?> Total ]</font></div>      </td>
  </tr>
  <tr>
    <td colspan="2"><div align="center">
	<?php
	include('includes/pagination.php');
	while($each = mysql_fetch_assoc($get_rec)){?>
      <table width="100%"  border="0" cellspacing="0" cellpadding="2">
            <tr>
              <td><strong><a href="<?=$SITE_URL;?>?V*<?=urlencode($each['rec_title']);?>"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?=$each['rec_title'];?></font></a></strong></td>
            </tr>
            <tr>
              <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php
			  $temp = explode('<P>',$each['rec_desc']);
			  $display = strip_tags($temp[0]).'<br/>'.strip_tags($temp[1]).'<br/>'.strip_tags($temp[2]).'<br/>'.strip_tags($temp[2]);
			  echo $display.'<br/>....';
			 ?></font></td>
            </tr>
            <tr>
              <td><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">[ <a href="<?=$SITE_URL;?>?V*<?=urlencode($each['rec_title']);?>">More</a> ] <?=$each['rec_views'];?> Reads </font></div></td>
            </tr>
          </table>
	  <hr style="width:80%;border:1px solid green;">
	  <?php } ?>
    </div></td>
  </tr>
</table>
Return current item: Free PHP Recipes Plug-n-Play Website Script