function htmldecode($encoded) {
return strtr($encoded,array_flip(get_html_translation_table(HTML_ENTITIES)));
}
$link = mysql_connect("mysql3.ezhostingserver.com", "evildj", "pbhell");
mysql_select_db("myhnt4b054");
if (isset($_POST[title_number]) || isset($_GET[title_number])) {
$max_display = 15;
$start = (empty($_GET[start])) ? 0 : $_GET[start];
$title_number = (isset($_POST[title_number])) ? $_POST[title_number] : $_GET[title_number];
$query1 = "SELECT ID FROM products_new WHERE title LIKE '%" . $title_number . "%'";
$query2 = "SELECT * FROM products_new WHERE title LIKE '%" . $title_number . "%'";
$order_query = " ORDER BY ID DESC";
$limit_query .= " LIMIT $start, $max_display";
$result = mysql_query($query1);
$num_records = mysql_num_rows($result);
if ($num_records > $max_display) {
$z = 1;
for ($x = 0; $x < $num_records; $x += $max_display) {
if ($x == $start) {
$pages .= " $z ";
} else {
$pages .= " $z ";
}
$z++;
}
if ($start + $max_display < $num_records) {
$next = " >> ";
}
if ($start - $max_display >= 0) {
$prev = " << ";
}
$links = $prev . $pages . $next;
}
$query2 .= $limit_query;
$result = mysql_query($query2);
$rows = mysql_num_rows($result);
if ($rows) {
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
$img = (empty($line[photo])) ? " " :
"" .
"
" .
"
";
$listings .= "
| " .
"$line[title] |
" .
" " .
htmldecode(nl2br($line[description])) . " " .
" $ " . number_format($line[price], 2, '.', ',') . "
| " .
"$img |
";
}
} else {
$listings = "| No Matching Listings - Please Call for Availability |
";
}
}
?>
:: Welcome to Falconhead - Boots - Belts - Buckles ::