Previous visit '; echo $row["v_update"]; } $newcount = $row["v_count"] + 1; $setsql = 'UPDATE visits SET v_update=NOW() , v_count='; $setsql .= $newcount; $setsql .= ' WHERE v_page="'; $setsql .= $page; $setsql .= '"'; mysql_db_query ($dbname, $setsql); if ($show) { $result = mysql_db_query ($dbname, $getsql); $row = mysql_fetch_array ($result); echo '
       This visit '; echo $row["v_update"]; echo '
Visits since Jan 2001 '; echo $row["v_count"]; echo '

'; } } // End of function visit_counter // ----------------------------------------------------------------- function footerLinks() { echo '
'; echo '
Search again'; echo '      '; echo 'Home
'; echo '
'; } // End of function footerLinks // ================================================= function showRes($result) { $total = mysql_num_rows($result); echo ""; echo ""; // Begin result set $count=0; while ($row = mysql_fetch_array ($result)) { $count++; $formput = ''; $formput .= ''; $formput .= ''; $formput .= "

'; $formput .= $row["yc_establish"]; $formput .= 'Phone: '; $formput .= $row["yc_phone"] . '
'; $formput .= $row["yc_address"]; $formput .= ', '; $formput .= $row["yc_county"]; $formput .= ', '; $formput .= $row["yc_postcode"]; $formput .= '
'; $formput .= ''; $formput .= $row["yc_descript"]; $formput .= '
"; $formput .= '
Result '; $formput .= $count; $formput .= ' of '; $formput .= $total; $formput .= ''; $formput .= ''; if ($row["yc_website"] <> '') { $formput .= 'Website: '; $formput .= ' '') { $formput .= 'Email: '; $formput .= '

'') { $sql .= "%' "; $sql .= "ORDER BY yc_outcode"; if ($host == "db.cheapnet.co.uk") { $db = mysql_connect ($host, $user, $password); mysql_select_db($dbname,$db); } $result = mysql_db_query ($dbname, $sql); } else { echo $sql; echo '
'; echo '

Invalid search! You are required to click on a county or a postal area code.

'; echo '

Click on "Search" to try again.

'; } // ============================================== if ($sql <> '') { if (showRes($result) > 0) { echo "
"; echo "
End of search results
"; } else { echo $sql; echo"
"; echo "

No records found. Try again!

"; } } footerLinks(); // ================================================= } else { // display form echo $HTTP_ENV_VARS["HTTP_HOST"]; echo '
'; ?>

OR