1) { $start = $_REQUEST['start']; if(!$start) $start = 0; $page = $start + 50; $page = $page/50; $ptitle = $c." search - Page $page"; $meta_keys = "jokes, funny, laugher, joke, gag, laughing"; $meta_desc = $c." search - Page $page"; $selected = "SEARCH"; include("header.php"); $temp3 = mysql_query("SELECT * FROM jokes WHERE category_name LIKE '%$c%' OR joke LIKE '%$c%' and is_published = 1 and dateadded <= NOW()"); $temp = mysql_query("SELECT * FROM jokes WHERE category_name LIKE '%$c%' OR joke LIKE '%$c%' and is_published = 1 and dateadded <= NOW() ORDER BY joke LIMIT $start, $perpage"); $total = mysql_numrows($temp3); ?>
".$total." results for '".$c."':

"; echo "Your search results are displayed below:

"; ?>
0) { echo ""; $tracker = $start+1; while($row = mysql_fetch_array($temp)) { echo ""; echo ""; $tracker++; } echo "
".$tracker.".   Category: ".$row[category_name]."  ".$row[votestartotal]." stars
".trim(substr(stripslashes($row[joke]), 0, 120))."... more

"; } else echo "
 - There are no results for your search criteria, please try again."; ?>
$perpage) { $start2 = $start - ($perpage * 2); if($start2 < 0) $start2 = 0; echo "< Previous Page  "; } if($start < $total) echo "  Next Page >"; ?>


Search For Jokes:

"; echo "Use the search box below to search for jokes and other musings on this site.

"; ?>
"; echo "Criteria:  "; echo ""; echo "

"; ?>