$rec?$rec:$next_end; echo "
Results $next_start to $last_val of $rec records\n"; } function print_ahref1($nextstart,$limit,$more,$rec) { if (($nextstart-$limit) > 0) { $prev_start=$nextstart-$limit; $ahref_str="[ Previous Results ]"; echo "    $ahref_str\n"; } if ($more) { $nextstart=$nextstart+$limit; $ahref_str="[ Next Results ]"; echo " $ahref_str
\n"; } echo "

\n"; } //end function ---------------------------------------------- include ("dbhost.php3"); $db = mysql_connect($host, $user, $pass); mysql_select_db($dbname,$db); $next_start = 0; $next_end = 0; $display_limit = 25; if(!$nextstart) { $next_start = 1; } else { $next_start = $nextstart; } $next_end = $next_start + $display_limit - 1; $sql = "SELECT code, company, product, upper(city), website, email FROM websearch_final order by city asc"; $result = mysql_query($sql); include ("websearch.php3"); if ($myrow = mysql_fetch_array($result)) { echo "Registered Websites with Gujarat Web Search Engine

\n"; echo "\n"; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $i = $next_start; $j = $next_end>mysql_num_rows($result)?mysql_num_rows($result):$next_end; do { mysql_data_seek($result,$i-1); $myrow = mysql_fetch_array($result); printf("\n", $myrow["code"]); printf("\n", $myrow["company"]); printf("\n", $myrow["product"]); printf("\n", $myrow[3]); printf("\n", $myrow["website"], $myrow["website"]); printf("\n", $myrow["email"], $myrow["email"]); $i++; }while ($i<=$j); echo "
CodeCompanyProductCityWebsiteEmail
%s%s%s%s%s%s
\n"; many_records1(mysql_num_rows($result),$next_start,$next_end); $still_more = (mysql_num_rows($result) > $next_end)?1:0; if (mysql_num_rows($result) > $display_Limit) { print_ahref1($next_start,$display_limit,$still_more,mysql_num_rows($result)); } } else { echo "
Sorry, no records were found!"; echo "

Back || Registration
"; } ?>